Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » High CPU load in Safari and Chrome browsers
High CPU load in Safari and Chrome browsers [message #778070] Wed, 11 January 2012 11:24 Go to next message
Andrei Neshcheret is currently offline Andrei NeshcheretFriend
Messages: 29
Registered: July 2009
Junior Member
Hi,

I manage a single sourcing product for my company (RCP version worked
prefectly), but in
Environment:
RAP - Nightly build,
(Safari - 5.1.2 (7534.52.7) Mac OS X 10.7.2 or
Google Chrome - 18.0.1003.1 dev-m )
only!!!, lead to high cpu load.
Debugging in shows me that function
--
_initAutoFlush : function( phase ) {
if( qx.ui.core.Widget._autoFlushTimeout == null ) {
// RAP: Fix for bug 303162
if( !qx.ui.core.Widget._inFlushGlobalQueues
|| phase < qx.ui.core.Widget._flushGlobalQueuesPhase ) {
qx.ui.core.Widget._autoFlushTimeout
= window.setTimeout( qx.ui.core.Widget._autoFlushHelper, 0);
}
}
--
called from _autoFlushHelper!, and always sets the timer again and again.
Because parameter phase is _FLUSH_PHASE_JOB(4) < _flushGlobalQueuesPhase
is _FLUSH_PHASE_LAYOUT(5)

_flushGlobalQueuesPhase is set from
---
flushGlobalLayoutQueue : function() {
qx.ui.core.Widget._flushGlobalQueuesPhase =
qx.ui.core.Widget._FLUSH_PHASE_LAYOUT;
....
---
How to break this circle?

PS: Other browsers IE9, and older Chrome worked fine, that is very
strange but is totaly unusable!

--
Best regards,
Andrew Nesheret
InfiNet Wireless Ltd.
Re: High CPU load in Safari and Chrome browsers [message #778144 is a reply to message #778070] Wed, 11 January 2012 13:21 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Andrew,
I can't reproduce it with Safari 5.1.2 (7534.52.7) and Chrome
17.0.963.26 on Windows (Controls Demo). Did you try it with the same
browsers, but on Windows? Is this high CPU load reproducible with
Controls/Workbench Demo or it is specific to your application?
Best,
Ivan

On 1/11/2012 1:24 PM, Andrew Nesheret wrote:
> Hi,
>
> I manage a single sourcing product for my company (RCP version worked
> prefectly), but in
> Environment:
> RAP - Nightly build,
> (Safari - 5.1.2 (7534.52.7) Mac OS X 10.7.2 or
> Google Chrome - 18.0.1003.1 dev-m )
> only!!!, lead to high cpu load.
> Debugging in shows me that function
> --
> _initAutoFlush : function( phase ) {
> if( qx.ui.core.Widget._autoFlushTimeout == null ) {
> // RAP: Fix for bug 303162
> if( !qx.ui.core.Widget._inFlushGlobalQueues
> || phase < qx.ui.core.Widget._flushGlobalQueuesPhase ) {
> qx.ui.core.Widget._autoFlushTimeout
> = window.setTimeout( qx.ui.core.Widget._autoFlushHelper, 0);
> }
> }
> --
> called from _autoFlushHelper!, and always sets the timer again and again.
> Because parameter phase is _FLUSH_PHASE_JOB(4) <
> _flushGlobalQueuesPhase is _FLUSH_PHASE_LAYOUT(5)
>
> _flushGlobalQueuesPhase is set from
> ---
> flushGlobalLayoutQueue : function() {
> qx.ui.core.Widget._flushGlobalQueuesPhase =
> qx.ui.core.Widget._FLUSH_PHASE_LAYOUT;
> ...
> ---
> How to break this circle?
>
> PS: Other browsers IE9, and older Chrome worked fine, that is very
> strange but is totaly unusable!
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: High CPU load in Safari and Chrome browsers [message #778430 is a reply to message #778070] Wed, 11 January 2012 17:11 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi Andrew.

A stack trace (created with the chrome dev tools in the "debug" variant
of the client library) would really help here.

Greetings,
Tim

Am 11.01.2012 12:24, schrieb Andrew Nesheret:
> Hi,
>
> I manage a single sourcing product for my company (RCP version worked
> prefectly), but in
> Environment:
> RAP - Nightly build,
> (Safari - 5.1.2 (7534.52.7) Mac OS X 10.7.2 or
> Google Chrome - 18.0.1003.1 dev-m )
> only!!!, lead to high cpu load.
> Debugging in shows me that function
> --
> _initAutoFlush : function( phase ) {
> if( qx.ui.core.Widget._autoFlushTimeout == null ) {
> // RAP: Fix for bug 303162
> if( !qx.ui.core.Widget._inFlushGlobalQueues
> || phase < qx.ui.core.Widget._flushGlobalQueuesPhase ) {
> qx.ui.core.Widget._autoFlushTimeout
> = window.setTimeout( qx.ui.core.Widget._autoFlushHelper, 0);
> }
> }
> --
> called from _autoFlushHelper!, and always sets the timer again and again.
> Because parameter phase is _FLUSH_PHASE_JOB(4) < _flushGlobalQueuesPhase
> is _FLUSH_PHASE_LAYOUT(5)
>
> _flushGlobalQueuesPhase is set from
> ---
> flushGlobalLayoutQueue : function() {
> qx.ui.core.Widget._flushGlobalQueuesPhase =
> qx.ui.core.Widget._FLUSH_PHASE_LAYOUT;
> ...
> ---
> How to break this circle?
>
> PS: Other browsers IE9, and older Chrome worked fine, that is very
> strange but is totaly unusable!
>
Re: High CPU load in Safari and Chrome browsers [message #778431 is a reply to message #778144] Thu, 12 January 2012 06:02 Go to previous messageGo to next message
Andrei Neshcheret is currently offline Andrei NeshcheretFriend
Messages: 29
Registered: July 2009
Junior Member
11.01.2012 19:21, Ivan Furnadjiev пишет:
> Andrew,
> I can't reproduce it with Safari 5.1.2 (7534.52.7) and Chrome
> 17.0.963.26 on Windows (Controls Demo). Did you try it with the same
> browsers, but on Windows?
Yes, this reproducible on Windows too, more over (i wrote before) on
*ANY* browsers i have, but older browser (not load CPU) only follow same
'cyclic' "Set timer pattern"
> Is this high CPU load reproducible with
> Controls/Workbench Demo or it is specific to your application?
No, (Controls Demo) worked fine, this only specific to my application.

i'm mean, this began only after my application (one of widget) try to
relayout its parent.

Code like this
--
org.eclipse.swt.widgets.
Link.setText(<a href=\"dummy\">file.txt</a>);
org.eclipse.swt.widgets.
Link.getParent().getParent().layout( true, true );
--
or/and my application have some IAction.AS_DROP_DOWN_MENU in toolbar manager
--
org.eclipse.jface.action.Action.setText( true );
org.eclipse.jface.action.Action.setEnabled( true );
org.eclipse.jface.action.ToolBarManager.update( true );
--

--
Best regards,
Andrew Nesheret
InfiNet Wireless Ltd.
Re: High CPU load in Safari and Chrome browsers [message #778432 is a reply to message #778430] Thu, 12 January 2012 06:23 Go to previous messageGo to next message
Andrei Neshcheret is currently offline Andrei NeshcheretFriend
Messages: 29
Registered: July 2009
Junior Member
11.01.2012 23:11, Tim Buschtöns пишет:
> Hi Andrew.
>
> A stack trace (created with the chrome dev tools in the "debug" variant
> of the client library) would really help here.

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


--
Best regards,
Andrew Nesheret
InfiNet Wireless Ltd.
Re: High CPU load in Safari and Chrome browsers [message #778433 is a reply to message #778144] Thu, 12 January 2012 08:46 Go to previous messageGo to next message
Andrei Neshcheret is currently offline Andrei NeshcheretFriend
Messages: 29
Registered: July 2009
Junior Member
11.01.2012 19:21, Ivan Furnadjiev пишет:
> Andrew,
> I can't reproduce it with Safari 5.1.2 (7534.52.7) and Chrome
> 17.0.963.26 on Windows (Controls Demo). Did you try it with the same
> browsers, but on Windows? Is this high CPU load reproducible with
> Controls/Workbench Demo or it is specific to your application?
> Best,
> Ivan

I'm create a Snipped to reproduce this bug, attached.
Key value to bug is Trailing <space> in Action text.

Run snipped and Press Do It Button to run 'set Timer' circle.


--
Best regards,
Andrew Nesheret
InfiNet Wireless Ltd.

package ru.infinet;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.rwt.lifecycle.IEntryPoint;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;

public class Simple implements IEntryPoint
{
private ToolBarManager manager;
Action action;

/**
* @wbp.parser.entryPoint
*/
@SuppressWarnings( "serial" )
@Override
public int createUI()
{
Display display = new Display();
Shell shell = new Shell( display );
shell.setSize( 449, 472 );
shell.setLayout( new GridLayout( 1, false ) );

{
final Composite composite = new Composite( shell, SWT.NONE );
composite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true, 1, 1 ) );
composite.setLayout( new GridLayout( 1, false ) );
{
final Group leftGroup = new Group(composite, SWT.NONE);
leftGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
leftGroup.setText("Left");
leftGroup.setLayout(new GridLayout(2, false));
{
final Button doItButton = new Button(leftGroup, SWT.NONE);
doItButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
action.setText( "None " ); // Trailing <SPACE> is very important to reproduce a bag!!!
manager.update( true );
}
});
doItButton.setText("Do It");
}
{
final ToolBar toolBar = new ToolBar(leftGroup, SWT.FLAT | SWT.RIGHT);
toolBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
manager = new ToolBarManager( toolBar );

action = new Action("None", IAction.AS_DROP_DOWN_MENU ) {};
manager.add( action );
manager.update( true );
}
}
}
shell.open();
while ( !shell.isDisposed() )
if ( !display.readAndDispatch() ) display.sleep();
display.dispose();
return 0;
}

}
  • Attachment: Simple.java
    (Size: 2.49KB, Downloaded 264 times)
Re: High CPU load in Safari and Chrome browsers [message #778434 is a reply to message #778433] Thu, 12 January 2012 09:05 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Andrew,
please file a bugzilla [1] and attach the snippet there.
[1] http://wiki.eclipse.org/RAP_Bug_Reporting_Howto
Thanks, Ivan

On 1/12/2012 10:46 AM, Andrew Nesheret wrote:
> 11.01.2012 19:21, Ivan Furnadjiev пишет:
>> Andrew,
>> I can't reproduce it with Safari 5.1.2 (7534.52.7) and Chrome
>> 17.0.963.26 on Windows (Controls Demo). Did you try it with the same
>> browsers, but on Windows? Is this high CPU load reproducible with
>> Controls/Workbench Demo or it is specific to your application?
>> Best,
>> Ivan
>
> I'm create a Snipped to reproduce this bug, attached.
> Key value to bug is Trailing <space> in Action text.
>
> Run snipped and Press Do It Button to run 'set Timer' circle.
>
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: High CPU load in Safari and Chrome browsers [message #778435 is a reply to message #778434] Thu, 12 January 2012 10:09 Go to previous message
Andrei Neshcheret is currently offline Andrei NeshcheretFriend
Messages: 29
Registered: July 2009
Junior Member
12.01.2012 15:05, Ivan Furnadjiev пишет:
> Andrew,
> please file a bugzilla [1] and attach the snippet there.
> [1] http://wiki.eclipse.org/RAP_Bug_Reporting_Howto
> Thanks, Ivan

Bug submitted https://bugs.eclipse.org/bugs/show_bug.cgi?id=368428
--
Best regards,
Andrew Nesheret
InfiNet Wireless Ltd.
Previous Topic:Larger difference between the theme 1.4 and 1.5
Next Topic:RAP to access outside Singleton class
Goto Forum:
  


Current Time: Fri Apr 26 23:00:07 GMT 2024

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

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

Back to the top