Community
Participate
Working Groups
Build Identifier: Version: 3.7.1 Build id: M20110909-1335 High CPU load function _initAutoFlush called from _autoFlushHelper!, and always sets the timer again and again. Reproducible: Always Steps to Reproduce: 1. Run Snipped 2. Press Do it button.
Created attachment 209357 [details] Run it and Press Do It button.
Trailing <space> is important in setText.
Can not reproduce with this snippet. A timer is running as result of the history support, but thats it. I tried with different themes, different browser and with standard and debug js library. Stack trace from newsgroup: qx.Class.define.statistics._initAutoFlash rap-client-9e5d6670.js:9629 qx.Class.define.statistics.addToGlobalJobQueue rap-client-9e5d6670.js:9775 qx.Class.define.members.addToJobQueue rap-client-9e5d6670.js:11438 qx.Class.define.members.addToQueueRuntime rap-client-9e5d6670.js:12007 proto.(anonymous function) rap-client-9e5d6670.js:4042 qx.Class.define.members._invalidateTotalSpacing rap-client-9e5d6670.js:55169 qx.Class.define.members.setCellWidth rap-client-9e5d6670.js:54809 qx.Class.define.members._beforeRenderLayout rap-client-9e5d6670.js:60961 qx.Class.define.members._layoutPost rap-client-9e5d6670.js:55191 qx.Class.define.members._layoutChild rap-client-9e5d6670.js:15710 qx.Class.define.members.flushChildrenQueue rap-client-9e5d6670.js:18861 qx.Class.define.members._flushChildrenQueue rap-client-9e5d6670.js:15648 qx.Class.define.statistics.flushGlobalLayoutQueue rap-client-9e5d6670.js:9827 qx.Class.define.statistics.flushGlobalQueues rap-client-9e5d6670.js:9668 qx.Class.define.statistics._autoFlushHelper rap-client-9e5d6670.js:9646 This seems to indicate a problem with layouting the ToolItem. Either the calculation of the text-width somehow returns incosistent values, or the values are not applied correctly. (Maybe a rounding error?) As long i can't reproduce it, its hard to fix. If the trailing space triggers this, perhaps we can just strip it? (Either in EncodingUtil.js, in MultiCellWidget.js, or in ToolItem.js.)
More investigation: Problem occur in ToolBar with SWT.DROP_DOWN item style.
(In reply to comment #3) > Can not reproduce with this snippet. A timer is running as result of the You can. 1. Run snipped in Chrome. 2. Press DoIt button (5 or 6 times). CPU ~0%, but this depend on page content (my application have a lot controls in page). --- dont stop here 1. Open Chrome Development tools 2. Goto Timeline page 3. Record for few seconds. 4. Open first (continuos) Timer fired
Created attachment 209371 [details] Image from Chrome Dev tools
Created attachment 209372 [details] Image with closed first timer line Same recorded timeline but with closed timer line.
Okay, got it. The "high CPU load" is only 2-4% for me, i assumed that that wasnt it.
Created attachment 209427 [details] Simplified snipped. This is Theme dependent too with same stacktrace. My Application use Business theme. Run this with themeId="org.eclipse.rap.design.example.business.theme"
Andrew, maybe I missed something, but which version of RAP are you using? Is it reproducible against nightly build (CVS HEAD)? Could be related to Bug 333858 (bug 301236)?
(In reply to comment #10) > Andrew, maybe I missed something, but which version of RAP are you using? Is it > reproducible against nightly build (CVS HEAD)? Could be related to Bug 333858 > (bug 301236)? Yes, latest RAP 1.5 from http://download.eclipse.org/rt/rap/nightly/runtime/
The problem are these two lines in ToolItem.js: this.setCellWidth( 0, 0 ); this.setCellWidth( 2, null ); i think they should be this._setCellWidth( 0, 0 ); this._setCellWidth( 2, null ); but i have to make a few tests first.
Fixed in CVS HEAD as described above. In the long run this layout code should be rewritten, its a mess!