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 |
Andrei Neshcheret 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 |
Ivan Furnadjiev Messages: 2427 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 |
Tim Buschtoens 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 |
Andrei Neshcheret 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 #778433 is a reply to message #778144] |
Thu, 12 January 2012 08:46 |
Andrei Neshcheret 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 277 times)
|
|
|
Re: High CPU load in Safari and Chrome browsers [message #778434 is a reply to message #778433] |
Thu, 12 January 2012 09:05 |
Ivan Furnadjiev Messages: 2427 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/
|
|
| |
Goto Forum:
Current Time: Sun Sep 15 10:20:39 GMT 2024
Powered by FUDForum. Page generated in 0.03942 seconds
|