Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344598 - High CPU usage with some widgets in IE8 and IE9
Summary: High CPU usage with some widgets in IE8 and IE9
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 11:22 EDT by Ivan Furnadjiev CLA
Modified: 2011-05-05 11:56 EDT (History)
1 user (show)

See Also:


Attachments
quick workaround (2.64 KB, patch)
2011-05-03 14:09 EDT, Tim Buschtoens CLA
no flags Details | Diff
improved workaround (3.38 KB, application/octet-stream)
2011-05-03 14:57 EDT, Tim Buschtoens CLA
no flags Details
proposed fix (27.76 KB, application/octet-stream)
2011-05-04 09:37 EDT, Tim Buschtoens CLA
no flags Details
improved fix (29.83 KB, patch)
2011-05-04 10:00 EDT, Tim Buschtoens CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Furnadjiev CLA 2011-05-03 11:22:40 EDT
Reproducible with Controls Demo. Start Controls Demo -> Table tab in IE8/9. CPU usage is bumped without any additional interventions. Reproducible too with List with scrollbars, expanded Combo...
Comment 1 Tim Buschtoens CLA 2011-05-03 14:09:53 EDT
Created attachment 194619 [details]
quick workaround

This seems to happen when a shell with shadows has a child with gradient but non-rounded border, so that it uses "%" instead of "px" to layout the background-shape. (Weird behavior from IE, but what else is new.)

The solution would be to change GraphicsMixin to always use "px", but i see know that is a work for at least a day or two. 

The patch works around the problem for the only two widgets that i know to have it with the default theme, TableColumn and ScrollBar. The issue might still exist for some custom-themes.

I also want to add that i have currently some issues with my system and IE seems very slow, but i cant tell if its RAP-related or not, so somebody else should test this patch in IE first.
Comment 2 Ivan Furnadjiev CLA 2011-05-03 14:28:17 EDT
Hm, there is some improvement, but still high CPU with Controls Demo. Select Table Tab, move mouse over the table to hover some items, click on the CTabFolder chevron to open the menu, move mouse back over the table. For 5-10 sec I have high CPU usage and UI is unresponsive.
Comment 3 Tim Buschtoens CLA 2011-05-03 14:57:50 EDT
Created attachment 194627 [details]
improved workaround

Using "px" instead of "%" for the vml-canvas-node helps with the menu. (Disabling shadows does NOT help in this case for some reason.)
Comment 4 Ralf Sternberg CLA 2011-05-03 16:30:36 EDT
Thanks for the fix. Applied second patch to CVS HEAD and triggered a rebuild for 1.4 M7.
Tim, please create a separate bug for improving this quick fix if needed.
Comment 5 Ivan Furnadjiev CLA 2011-05-04 04:15:17 EDT
Still high CPU usage with Workbench Demo in IE9. Inside Eclipse internal browser the Workbech Demo is completely unresponsive. In external IE it is responsive, but with high CPU load. Just start the Workbech Demo and don't do anything. Tested with updated runtime.
Comment 6 Ivan Furnadjiev CLA 2011-05-04 04:23:09 EDT
More over, the fix broke the hover effect in List in IE... Reproducible with Controls Demo -> List Tab.
Comment 7 Tim Buschtoens CLA 2011-05-04 09:37:07 EDT
Created attachment 194713 [details]
proposed fix

This is not a workaround, but the real fix. Needs some polishing (formatting, adding tests), but should work.

All shapes are now always rendered with absolute values, no more %. As a result there is a bit more layouting going on internally (as js now has to do what the browser did before), but it only affects a handful of widgets on resize (Scrollbar-thumb, table-header, list-items, perhaps more).
Comment 8 Tim Buschtoens CLA 2011-05-04 10:00:47 EDT
Created attachment 194716 [details]
improved fix

sovles some glitches in FF3.6
Comment 9 Ralf Sternberg CLA 2011-05-04 11:00:37 EDT
Applied patch (attachment 194716 [details]) to CVS HEAD
Comment 10 Ivan Furnadjiev CLA 2011-05-05 04:28:53 EDT
(In reply to comment #9)
> Applied patch (attachment 194716 [details]) to CVS HEAD
Marked as fixed.
Comment 11 Tim Buschtoens CLA 2011-05-05 11:56:01 EDT
I cleaned and refactored the commited changes in CVS HEAD. Also added/adjusted some tests. Also some minor optimizations.