This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 43840 - Huge performance regression caused by "Memory" action
Summary: Huge performance regression caused by "Memory" action
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-05-25 16:26 UTC by Jan Lahoda
Modified: 2008-12-22 21:58 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A few full thread dumps while the NB main window is being redrawn. (34.61 KB, text/plain)
2004-05-25 16:27 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2004-05-25 16:26:15 UTC
NB trunk continuous build 20040525-1150
NB refactoring build 040524. JDK1.4.2_04.

The drawing of "Memory" toolbar action is very
slow on Linux. Simply open NB, open the Memory
toolbar action and switch OS-workspaces or
otherwise force NB to redraw. It takes ages to
redraw (the NB main window is gray for ages, only
the Memory view is being redrawn). It is probably
caused by smooth colors in Memory view. I have
made a few full thread dumps during the NB window
redrawal (these thread dumps are from the
continuous build 20040525-1150).

It is much more visible in the refactoring build,
but it is quite reproducible in the trunk NB build.
Comment 1 Jan Lahoda 2004-05-25 16:27:13 UTC
Created attachment 15134 [details]
A few full thread dumps while the NB main window is being redrawn.
Comment 2 Jan Lahoda 2004-05-25 16:31:15 UTC
To clarify myself: if I switch the Memory view off, the IDE is quite
responsive. When I switch the Memory view on, it is nearly unusable
(in particular when I change the OS-workspaces often). This is why I
suspect  Memory view (action). I think that the thread dumps confirm this.
Comment 3 Antonin Nebuzelsky 2004-05-25 16:39:11 UTC
I'll have a look at it.
Comment 4 _ ttran 2004-05-25 17:48:03 UTC
this is definitely a problem on Lahoda's linux laptop.  Java2D
transluency performance there is horrible.  Windows seems to be okay.

In any case, it's wise to turn off the memory meter when one measures
actions which fall into the 100ms category
Comment 5 Jan Becicka 2004-05-25 18:01:03 UTC
I'm not sure if the problem is on "Lahoda's linux desktop". Let's say
"any linux desktop". AFAIK Marek Grummich has the same problem.
Comment 6 _ ttran 2004-05-25 18:35:37 UTC
I didn't say "only on Lahoda's laptop".  We knew it's definitely a
problem for remote X.

I don't have troubles on my linux laptop (Tecra S1, Radeon Mobility
9000, XFree 4.3)
Comment 7 _ rkubacki 2004-05-26 08:24:25 UTC
I don't know who came with the idea to use GradientPaint - it eats
100kB per second just to paint the memory meter. With simple Color it
is 15kB per second.

BTW: there is a bug that is not visible just because every time we
change the memory use. If the timer ticks and update method sets text
to the same value no repainting is forced. It should use something like 
        if (text.equals(getText())) {
            repaint();
        }
        else {
            setText(text);
        }

 instead of setText(text).
Comment 8 _ ttran 2004-05-26 10:50:06 UTC
I asked Petr N to revert the painting back to the old boring but
lightweght one.
Comment 9 _ tboudreau 2004-05-26 11:05:41 UTC
Note that if the GradientPaint objects are a problem there, it will probably also be a 
problem for any look and feel except Metal - winsys uses GradientPaint objects heavily for, 
e.g. GTK L&F.

Note that I notice one third party look and feel uses its own GradientPaint impl, 
presumably for this reason.  For simple things that could be  a good idea for us.
Comment 10 Petr Nejedly 2004-05-26 13:08:31 UTC
Fixed in
openide/src/org/openide/actions/GarbageCollectAction.java,v1.29
Comment 11 Marian Mirilovic 2004-08-11 10:26:05 UTC
verified in [nb_dev](200408101800)