Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT message queue clogged by browser messages
SWT message queue clogged by browser messages [message #956287] Wed, 24 October 2012 11:42 Go to next message
Christian Sell is currently offline Christian SellFriend
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
Re: SWT message queue clogged by browser messages [message #956298 is a reply to message #956287] Wed, 24 October 2012 11:50 Go to previous message
Christian Sell is currently offline Christian SellFriend
Messages: 51
Registered: August 2010
Member
I have to correct myself. Both the WM_PAINT and the nsAppShell:EventID messages occur in standalone firefox as much as in the SWT embedded version. It therefore seems to me that it is simply the high frequency of these messages that bogs down SWT
Previous Topic:Parent container of SWT Browser on XULRunner 10.0.2 is handling Enter and Escape key presses
Next Topic:SWTException : Invalid image
Goto Forum:
  


Current Time: Thu Apr 25 04:04:45 GMT 2024

Powered by FUDForum. Page generated in 0.02897 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top