SWT message queue clogged by browser messages [message #956287] |
Wed, 24 October 2012 11:42 |
Christian Sell Messages: 51 Registered: August 2010 |
Member |
|
|
Hello,
we are using the SWT browser widget (SWT.MOZILLA style, on top of XULRunner 1.9) to display web pages in our application. However, we discovered that when accessing certain web pages that made heavy use of javascript, the responsiveness of the application becomes so bad that it is almost unusable. My investiagtion of the issue so far yielded the following results:
The page uses javascript to display a ticker with stock prices along the bottom of the visible area, thus constantly updating the screen. When halting the main thread from within the eclipse debugger while the page is displayed, I always end up inside the SWT message processing loop for a message with ID 0xC25D. Spy++ shows me that this message is registered as "nsAppShell:EventID", originating from a window with class "nsAppShell:EventWindowClass". I found that this message is registered by nsAppShell via RegisterWindowMessage.
When I display the same page in a standalone firefox browser, the CPU goes up to 3%, and I can see (again using Spy++) the browser window constantly posting WM_PAINT messages. When displaying the page inside the SWT browser, I see the above mentioned messages, and CPU goes to 15% on my quadcore. The page is not showing any network activity in the background.
My preliminary conclusion is that message processing in SWT is not fast enough for this scenario, causing nsAppShell to go into some special processing for "starved native messages" (see comments in here: http:// dxr.mozilla.org/mozilla-central/widget/windows/nsAppShell.cpp.html), which congests the SWT message queue to the degree where the application is almost completely bocked. Does anyone have suggestions how I can remedy this situation?
thanks,
Christian
|
|
|
|
Powered by
FUDForum. Page generated in 0.03194 seconds