Bug 24762 - [Dialogs] Some operations exceedingly slow
Summary: [Dialogs] Some operations exceedingly slow
Status: RESOLVED DUPLICATE of bug 36698
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Linux-GTK
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
: 32328 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-14 17:11 EDT by Gerard Milmeister CLA
Modified: 2003-04-28 10:55 EDT (History)
4 users (show)

See Also:


Attachments
debug log file of -ebug (576 bytes, text/plain)
2003-02-12 07:06 EST, Gerard Milmeister CLA
no flags Details
log file of eclipse (30.16 KB, text/plain)
2003-02-12 07:06 EST, Gerard Milmeister CLA
no flags Details
strace log file (100.96 KB, application/octet-stream)
2003-02-12 07:06 EST, Gerard Milmeister CLA
no flags Details
Configuration details (588.83 KB, text/plain)
2003-03-13 14:48 EST, Gerard Milmeister CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerard Milmeister CLA 2002-10-14 17:11:45 EDT
Configuration:
Eclipse 2.0.1
RedHat 8.0
JDK 1.4.1

Some operations, like first opening the properties dialog or
changing within dialog are extremely slow. They can take up
to 2 minutes! After the first time, everything works quite fast
again. Other operations take even longer. Generally it's the
processing in dialog windows, for example in new project.
Comment 1 Gerard Milmeister CLA 2002-10-14 18:55:44 EDT
Further notes:
CPU is Pentium II 450MHz
Also this is not exactly quick, I can work adequately with Eclipse. I can also
accept that it is a little slow at the beginning, but these delays are unusual.
I made an strace and an ltrace while running eclipse.
strace simply doesn't show anything during these stops, and ltrace shows a lot
of malloc's and free's and nothing else (so no file operations too).
I increased the memory size for JVM, to no avail. I also made the JVM spit out
some information using -verbose and -verbose:gc. During these long halts, they
don't show anything at all.
Comment 2 Tod Creasey CLA 2002-10-15 11:06:01 EDT
This is due to plugin activation when Eclipse is first invoked - a Properies
page in particular will invoke numerous plugins that can take some time (like
the JDT plugins).

Do you have another example of an operation that is very slow?
Comment 3 Tod Creasey CLA 2002-10-15 11:06:41 EDT
Also how much memory do you have on your machine?
Comment 4 Gerard Milmeister CLA 2002-10-15 11:17:41 EDT
I have 256M.
Also, if there was plugin activation, should there not be
output due to the -verbose flag? i.e. class loading
garbage collection. During the stall there is no GC.
I use Eclipse 2.0 for a while, and this probably has only
recently occurred. I don't know what could have triggered it.
Comment 5 Andrew Irvine CLA 2002-11-20 12:25:48 EST
Have you seen any improvement with M3?  A few perfomance issues were addressed 
in that release.

The more specific you can be with respect to what operations are slow the 
faster we can concentrate on improving that area.
Comment 6 Gerard Milmeister CLA 2002-11-30 21:06:46 EST
I have installed Eclipse M3 on my new computer
(P4 2.4 GHz, 512MB), and the Preferences dialog
still takes some 10 seconds to popup. I started
Eclipse several times, so that in the end, almost
no disk access is made, so it can't be the problem
of a slow HD.
Comment 7 Andrew Irvine CLA 2002-12-02 07:46:06 EST
motif or gtk?  Which window manager are you using?  How large is your log file 
in .metadata?  Just trying to reproduce the scenario.  I run a PIII, 500 with 
gtk and motif on RH7.2, KDE, IBM JDK1.3.  I don't see the delays you report.
Comment 8 Gerard Milmeister CLA 2002-12-02 11:46:39 EST
The .log file was some 1.3 MB, I deleted, but no noticeable change.
Its the GTK version on RedHat 8.0 with Sawfish Window Manager and
JDK 1.4.1.
In fact I use the same configuration on my machine at work, but that
is a Pentium IV/2.2GHz with 1GB RAM, and there the delay is much shorter.
I don't know what the difference might be.
I also tried a fresh installation of Eclipse with a different workspace -
to no avail.
Comment 9 Andrew Irvine CLA 2002-12-05 16:39:22 EST
Still have not been able to reproduce this problem.  When I open the 
preferences dialog for the first time I can count "one one thousand, two one 
thousand" and it complete prior to my last "thousand", definately less than 10 
seconds and I have a 500Mhz machine.  I have 21 projects open in my workspace.

I am assuming you are still using the same configuration:
  P4 2.4 GHz, 512MB  256 Meg
  RH 8.0
  JDK 1.4.1  (IBM or SUN?)
  
What command line arguements are you using to start eclipse?
How many editors are open in your workspace
How many projects are open in your workspace
Are you running locally or over a server?

On windows programs such as Norton anti-virus effect the performance of 
eclipse, are you running similar types of software in the background?

I am assuming you have ran other programs on this same computer with no 
performance issues.
Comment 10 Gerard Milmeister CLA 2002-12-06 08:06:09 EST
On both machines I start eclipse without any commandline arguments. In fact
I tried various arguments on the slow eclipse installation, for example
-vmargs -Xms150m -Xmx180m, but no change.
The JDK 1.4.1 is from Sun on both machines.
The same projects etc...
I can't figure what the difference may be.
What other information should I give.
Would an strace help?
Comment 11 Andrew Irvine CLA 2003-02-06 13:58:13 EST
We have not been able to reproduce this behaviour on our machines.  Are you 
still having trouble on that one machine?  The R2.1 M5 candidate load is 
looking fairly good on GTK.  

Can we either close this bug or lower it's priority?
Comment 12 Gerard Milmeister CLA 2003-02-07 09:05:22 EST
Just now I experienced the problem again. I started Eclipse on my 2.2GHz machine
running JDK 1.4.1. I clicked on a file in the Package Explorer. It took around
20 seconds for the editor to show up.

There is also another problem, that occurs sometimes. Menus and scrollbars stay
responsive, but nothing happens. For example I can move the scrollbar in the
editor, but the text does not scroll. After a long while everything works again,
but sometimes it doesn't work again and I have to restart Eclipse.

Also sometimes I type in the editor window and suddenly input doesn't show up
anymore until after a delay of perhaps 15 to 20 seconds.

I have not found anything unusual in my configuration and happens with both the
JDKs from Sun and from IBM.
Comment 13 Kevin Haaland CLA 2003-02-07 16:22:45 EST
Investigate for RC1.
Gemi, an strace would be helpful.
Could you also try:
- install M5 build (I20030206-1700)
- copy the .options file from plugins/org.eclipse.ui to the directory with the 
eclipse executable
- run with: -debug -vm {java-install-dir}\bin\java.exe 
(this gives you a console)
Comment 14 Gerard Milmeister CLA 2003-02-12 06:59:57 EST
This is what I did:
1. Eclipse M5 is in /opt/eclipse
2. I copy plugins/org.eclipse.ui_2.1.0/.options to /opt/eclipse
3. I start using /opt/eclipse/eclipse -debug -vm /opt/jdk1.4.1/bin/java
4. The output is in debug.log, attached.
5. When Eclipse has started up I click on a file in the explorer, it takes some
time to open the editor, then I can't scroll the text in the editor, only the
scrolbar changes
6. The same, but just before I click on the file to open, I do an strace on the
process. The output is in the attached strace.log.gz
7. Incidentally I get SWT error, I attach the error log in log.gz
Comment 15 Gerard Milmeister CLA 2003-02-12 07:04:52 EST
Sorry,

By mistake I attached the files to another bug report of mine,
number 28730. Can you retrieve it from there?
Comment 16 Gerard Milmeister CLA 2003-02-12 07:06:00 EST
Created attachment 3436 [details]
debug log file of -ebug
Comment 17 Gerard Milmeister CLA 2003-02-12 07:06:22 EST
Created attachment 3437 [details]
log file of eclipse
Comment 18 Gerard Milmeister CLA 2003-02-12 07:06:44 EST
Created attachment 3438 [details]
strace log file
Comment 19 Andrew Irvine CLA 2003-02-12 15:49:37 EST
What were you doing when you generated the strace?  It would be ideal if the 
strace could capture one slow reproducable operation with no other noise from 
other events.
Comment 20 Andrew Irvine CLA 2003-02-14 14:51:59 EST
Could you attach your .gtkrc/.gtkrc-2.0 file?  What themes do you have on the 
machine that is running slow?  We have noted that some themes slow down 
eclipse.  In addition if you request a font that is not natively supported then 
performance is also impacted.
Comment 21 Gerard Milmeister CLA 2003-02-27 07:09:52 EST
I used to use Bluecurve on RH. But it seems that it doesn't depend
on the theme, as it happens with any of them.

I just installed RC1. There is no improvement to my problem.
Sometimes Eclipse works perfectly alright, but at other times
I simply can't do anything. When I move the cursor or edit
in the text editor, it hangs a while, than does something, then
hangs a while etc...
Comment 22 Nick Edgar CLA 2003-02-27 15:02:21 EST
Have you tried using a different VM?
Comment 23 Gerard Milmeister CLA 2003-03-03 18:48:13 EST
I tried:
- Sun  1.4.1_01-b01
- Blackdown 1.4.1_01-b01
- IBM 1.4.0 IBM build cxia32140-20020917a

with the same results.
Comment 24 Gerard Milmeister CLA 2003-03-13 10:33:17 EST
Installed RC2, it seems to get even worse.
There are periods, where everything seems to work alright. But then,
for example I do a Rebuild Project, the window pops up with the text "Building
project", but then nothing happens.
Sometimes also, Eclipse sits there seemingly idle, but I see from the output
of top, that the java process consumes pretty much all resources.
I really don't know what the problem is.
I even did weird things like ipcclean...

So when I work with Eclipse, I have to kill it and restart it several times,
to get to work a little.

I really like Eclipse, but in this state it is difficult to use it.
Please tell me what I can do to localize the problem.
Comment 25 Tod Creasey CLA 2003-03-13 10:42:32 EST
Gerard I suspect you are seeing Bug 28343 which will eat up all of your CPU 
time. Do you run with the CVS Decorator on? If so turn it off an see if this 
solves your problem.

Either way Bug 28343 is fixed in the current integration build - the PR is 
only open so that it can be verified.
Comment 26 Veronika Irvine CLA 2003-03-13 10:50:08 EST
Note that "-vmargs -Xms150m -Xmx180m" must come at the very end of the command 
line.  Placing it in the middle will have no effect.  I would recommend "-
Xmx256M".

What is the result of "rpm -q atk gtk2 glib pango freetype"?

What is the result of "echo $LANG"?

Do you have any fonts specified in .gtkrc-2.0?  Have you changed the default 
fonts through the Preferences dialog?

Is your workspace located on your machine or on a remote server?

Do you have any anti-virus software running?  Does it run on every file read?

Can you copy the Configuration details from the About dialog in Eclipse?
Comment 27 Gerard Milmeister CLA 2003-03-13 14:46:38 EST
rpm -q atk gtk2 glib pango freetype
atk-1.0.3-1
gtk2-2.0.6-8
glib-1.2.10-8
pango-1.1.1-1
freetype-2.1.2-7

LANG=en_US
LC_ALL is empty

Font ist standard RedHat, font for editor is LucidaSansTypeWriter-12 (bitmap
font). I attach the config details.

I just installed the motif version in parallel. It seems noticably faster.
Can this be true? If yes, I hope the GTK2 version will catch up. I am not keen
on using the motif version.
Comment 28 Gerard Milmeister CLA 2003-03-13 14:48:51 EST
Created attachment 4117 [details]
Configuration details
Comment 29 Andrew Irvine CLA 2003-03-13 14:59:30 EST
I note from the configuration details that you have not specified -Xmx256M, or 
any other size.  I am going to try running my workspace with the preferences 
you have set.

Command-line arguments: -os linux -ws gtk -arch x86 -
data /home/gemi/.eclipse/workspace -install file:/opt/eclipse/
Comment 30 Veronika Irvine CLA 2003-03-13 15:37:20 EST
Your glib looks fairly old, we recommend glib 2.0.4-1 but I am not sure this 
will have any impact on performance.

Comment 31 Gerard Milmeister CLA 2003-03-13 15:41:31 EST
sorry, that would be
rpm -q glib2
glib2-2.0.6-2
Comment 32 Andrew Irvine CLA 2003-03-13 16:53:14 EST
Gerard,

Can you answer these two questions from comment #26:

Is your workspace located on your machine or on a remote server?

Do you have any anti-virus software running?  Does it run on every file read?

Comment 33 Andrew Irvine CLA 2003-03-13 17:02:46 EST
After loading your preferences I noted all the nice colours you have on the 
tool bar.  Have you tried resetting the preferences to their defaults and 
seeing if there is a performance improvement.  This is in align with comment 
#25, where Tod wanted you to try turning decorations off.

You can save your current preferences by Window->Preferences->Export
The easiest way to reset your preferences is to start a new workspace.  The 
other way is remove all the preference files from .metadata/.plugins.

I would try the new workspace.  If you don't notice a difference in performance 
then you can reimport your old preferences you saved above.

Please let me know if you notice any difference.  I have noticed differences 
here on my workstation, although I don't think it is enough to account for the 
performance issues you have reported.
Comment 34 Gerard Milmeister CLA 2003-03-13 17:21:54 EST
The workspace is local, the source code of the project is checked out from CVS.
There is no anti-virus software on the machine.

I will look what I can do regarding to default configuration.

Maybe it would be an idea to bundle the required gtk2 libraries with
eclipse?
Comment 35 Gerard Milmeister CLA 2003-03-14 06:33:10 EST
I tried a fresh workspace and created my project anew. However
the problem is still the same.
Comment 36 Gerard Milmeister CLA 2003-03-14 07:17:01 EST
So this is what I did:
I grabbed the latest gtk sources and compiled them into a separate location
(/opt/gtk):
glib-2.2.1, gtk+-2.2.1, pango-1.2.1, atk-1.2.0
then I set the LD_LIBRARY_PATH to /opt/gtk/lib
and lo! everything seems to be working nicely!
I will have to work a little with it to see if it is really
as it seems, but I am full of hope.
Comment 37 Gerard Milmeister CLA 2003-03-14 07:28:13 EST
Alas, my hope was a little to early. A first start did work,
but afterwards it wouldn't get past the splash screen and hang :-(
Comment 38 Tod Creasey CLA 2003-03-25 10:46:03 EST
*** Bug 32328 has been marked as a duplicate of this bug. ***
Comment 39 Nick Edgar CLA 2003-03-25 12:27:01 EST
Removing milestone tag since we still don't understand this problem.
Comment 40 tolan blundell CLA 2003-04-02 18:44:46 EST
Not sure if I should be posting here, but it gave me an account so..

I have what seems to be the same problem. It mostly manifests when opening a
file from the package explorer (this is the main hierarchy view i use), and when
selecting a member from the outline view (for a file already open in the editor).

I tried deleting my workspace (as it was from a previous build and i thought
there might be some sort of conflict), re-importing the project I'm working on,
and altering a few settings back to what they had been. This seemed to almost
solve the problem, it happened rarely for a few days, but now it's getting more
regular.

I'm using:

Redhat 8 
Gnome 2.0
Eclipse 2.1 RC3a
sun 1.4.1 jvm

Hardware is:
800mhz athlon
384 meg ram
lots of free diskspace
Comment 41 Tod Creasey CLA 2003-04-25 16:01:46 EDT
Adding Felipe to the list as many GTK performance issues were sorted out by 
the RedHat 9 implementation. Have you tried the same thing on RedHat 9.0?
Comment 42 Felipe Heidrich CLA 2003-04-25 16:32:29 EDT
Gerard, look Bug#36698. It has instructions about how fix your GTK.
Comment 43 Gerard Milmeister CLA 2003-04-25 17:48:45 EDT
I actually run RH 9 now, and it seems to be better.
Thanks.
Comment 44 Tod Creasey CLA 2003-04-28 10:55:52 EDT
Marking a duplicate of 36698

*** This bug has been marked as a duplicate of 36698 ***