Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 164930

Summary: CPU consumption
Product: [Tools] GEF Reporter: Manuel Selva <manuel.selva>
Component: GEF-Legacy Draw2dAssignee: gef-inbox <gef-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: critical    
Priority: P3    
Version: 3.2.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: Bugzilla 3.4 Migration

Description Manuel Selva CLA 2006-11-17 02:15:26 EST
Hi all,

I am wrting an eclipse plug in using draw2d to draw charts in a dedicated Eclipse view. Initially my plugin was developed usind draw2d 3.1. All worked fine. During the build of my chart the CPU consumption was quite important and fallen at the end of the chart build.

I replaced 5 days ago my draw2d plugin by the 3.2.1 version. All is fine excpected  a strange extra CPU consumption. During the build of my chart the CPU consumption is still quite important (it is normal) and when the build is finished this consumption doesn't decrease. After 1 or 2 minutes the CPU consumption associated to "java process" decreases but the X process (owned by root) jump from about 10% to 50% and all my graphical applications become very slow.

Is there a link with draw2d ?

Thanks

Manu
Comment 1 Manuel Selva CLA 2006-11-17 08:26:54 EST
I can't reproduce the bug with a simple snippet and i can't exprot all my plugins. 

Is there one way for me to try to debug what is happening ?

Thanks 
Comment 2 Anthony Hunter CLA 2006-11-17 09:49:52 EST
Perhaps this would be better suited for a question on the GEF newsgroup.

Do you have access to any Java debugging tools other than Eclipse?

I would suggest XRay, which is free but only available on windows. 
You could also try YourKit
Comment 3 Anthony Hunter CLA 2007-03-14 08:03:05 EDT
Reopen if this is a concrete issue.
Comment 4 Manuel Selva CLA 2007-03-14 08:39:43 EDT
(In reply to comment #3)
> Reopen if this is a concrete issue.
> 

Hi Antony,

Sorry i was thinking this bug was closed by myself since i founded the source of it in my own code. Sorry for posting it.

Manuel Selva
Comment 5 Randy Hudson CLA 2007-03-14 09:46:32 EDT
Another possible FAQ entry.  I'm going to just guess that during either layout or painting, your code was doing something that caused another paint and layout to occur.  For example, setting the *figure's* background color during paintFigure(...) instead of setting the Graphics background color.
Comment 6 Manuel Selva CLA 2007-03-14 10:50:08 EDT
(In reply to comment #5)
> Another possible FAQ entry.  I'm going to just guess that during either layout
> or painting, your code was doing something that caused another paint and layout
> to occur.  For example, setting the *figure's* background color during
> paintFigure(...) instead of setting the Graphics background color.
> 

You are right Randy !! and it was resulting in an infinite loop. This infinite loop didn't occured with previous version of Draw2D. A modification in DefferedUpdateManager class may be the origin ... but in every ways my code wasn't clean at all!!!
Comment 7 Randy Hudson CLA 2007-03-14 11:55:39 EDT
I think anyone can edit the FAQ, and a complete history is maintained should anything get messed up. Thanks.
Comment 8 Anthony Hunter CLA 2009-08-24 12:01:56 EDT
LATER and REMIND resolutions will be going away with the upgrade of Bugzilla to the latest Bugzilla 3.4.  They are no longer part of the default Bugzilla installation. See http://dev.eclipse.org/mhonarc/lists/eclipse.org-committers/msg00778.html for the announcement.

As a result 
RESOLVED + REMIND OR LATER 
will be changed to
RESOLVED + WONTFIX

This unfortunately also means I need to REOPEN and then RESOLVE as WONTFIX

Sorry for the inconvenience.
Comment 9 Anthony Hunter CLA 2009-08-24 12:14:59 EDT
LATER and REMIND resolutions will be going away with the upgrade of Bugzilla to the latest Bugzilla 3.4.  They are no longer part of the default Bugzilla installation. See http://dev.eclipse.org/mhonarc/lists/eclipse.org-committers/msg00778.html for the announcement.

As a result 
RESOLVED + REMIND OR LATER 
will be changed to
RESOLVED + WONTFIX

This unfortunately also means I need to REOPEN and then RESOLVE as WONTFIX

Sorry for the inconvenience.