Bug 34738 - Opening/closing projects very slow
Summary: Opening/closing projects very slow
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2003-03-11 15:48 EST by Ritchie Schacher CLA
Modified: 2005-04-21 15:45 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ritchie Schacher CLA 2003-03-11 15:48:17 EST
I have a workspace with 197 projects.  Approximately 20 are from a CVS 
repository.  I have CVS label decorations turned on.  When I close or open a 
project, the workspace is busy for an very long time.
Comment 1 Nick Edgar CLA 2003-03-12 01:35:05 EST
Does performance improve if you turn off CVS label decorations?
Comment 2 Nick Edgar CLA 2003-03-12 01:35:44 EST
Do you have autobuild on?
Are there prerequisite relationships between the projects (i.e. does the closed 
project have dependents that need to be rebuilt)?
Comment 3 Ritchie Schacher CLA 2003-03-12 09:29:11 EST
Autobuild is off; no difference in performance with label decorations turned 
off.  I am using the RC1 build.
Comment 4 Nick Edgar CLA 2003-03-12 09:42:41 EST
What does the progress monitor report when waiting?
Comment 5 Ritchie Schacher CLA 2003-03-12 09:54:57 EST
The monitor says "updating.".

Others on the team have observed the same thing after adding a project from CVS.
Comment 6 Nick Edgar CLA 2003-03-12 14:47:38 EST
What perspective are you in?  Do you have multiple perspectives open?
If you open just a resource perspective (with no other windows or perspectives 
open), close all editors, and try again, is it any better?
I suspect certain views are taking a long time processing workbench deltas.

Comment 7 Ritchie Schacher CLA 2003-03-12 16:57:46 EST
I had a Java perspective, CVS perspective, and debug perspective open.  I just 
closed them all and left only the Resource perspective with the navigator, and 
closed the project.  Same problem.
Comment 8 Ritchie Schacher CLA 2003-03-31 10:13:22 EST
Is this fixed for 2.1?  I'm still seeing it in the 0326 integration build.  
Comment 9 Nick Edgar CLA 2003-03-31 11:23:24 EST
Although various performance improvements were made for 2.1, this particular 
bug was not addressed for 2.1 (which is why it's still open).
Comment 10 Scott Rich CLA 2003-03-31 17:03:51 EST
I see the same pause when creating a new Java project in our self-hosting 
environment.  We certainly have lots of dependencies within the 300 plug-in 
projects I have loaded, but I don't think any of them are truly cyclical, and 
none of them are showing build-path errors.  Here is the state of the VM during 
the pause, from a ctrl-break on the 2.1 build:

Full thread dump Classic VM (J2RE 1.3.1 IBM Windows 32 build cn131-20020710, 
native threads):
    "Snapshot" (TID:0x190BDE0, sys_thread_t:0x1382D248, state:CW, native 
ID:0x454) prio=5
	at java.lang.Object.wait(Native Method)
	at org.eclipse.core.internal.resources.DelayedSnapshotRunnable.run
(DelayedSnapshotRunnable.java:38)
	at java.lang.Thread.run(Thread.java:512)
    "Decoration" (TID:0x254B2B8, sys_thread_t:0x12EC6800, state:CW, native 
ID:0x8F8) prio=1
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:429)
	at org.eclipse.ui.internal.decorators.DecorationScheduler.next
(DecorationScheduler.java:214)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$2.run
(DecorationScheduler.java:240)
	at java.lang.Thread.run(Thread.java:512)
    "org.eclipse.jdt.internal.ui.text.JavaReconciler" (TID:0x26C9160, 
sys_thread_t:0x12EBCD88, state:CW, native ID:0x884) prio=1
	at java.lang.Object.wait(Native Method)
	at 
org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run
(AbstractReconciler.java:161)
    "Java indexing" (TID:0x900270, sys_thread_t:0x128A8218, state:CW, native 
ID:0x684) prio=4
	at java.lang.Thread.sleep(Native Method)
	at org.eclipse.jdt.internal.core.search.processing.JobManager.run
(JobManager.java:349)
	at java.lang.Thread.run(Thread.java:512)
    "Finalizer" (TID:0x901900, sys_thread_t:0x891750, state:CW, native 
ID:0x144) prio=8
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:133)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java(Compiled 
Code))
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java(Compiled 
Code))
    "Reference Handler" (TID:0x901948, sys_thread_t:0x882578, state:CW, native 
ID:0x5D4) prio=10
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java(Compiled Code))
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java(Compiled 
Code))
    "Signal dispatcher" (TID:0x901990, sys_thread_t:0x87F598, state:R, native 
ID:0x8A4) prio=5
    "main" (TID:0x9019D8, sys_thread_t:0x7B0A58, state:R, native ID:0x794) 
prio=5
	at org.eclipse.jdt.internal.core.DeltaProcessor.updateClasspathMarkers
(DeltaProcessor.java:1956)
	at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged
(DeltaProcessor.java:1693)
	at org.eclipse.core.internal.events.NotificationManager$1.run
(NotificationManager.java:137)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java(Compiled Code))
	at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled Code))
	at org.eclipse.core.internal.events.NotificationManager.notify
(NotificationManager.java:152)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges
(NotificationManager.java:67)
	at org.eclipse.core.internal.resources.Workspace.broadcastChanges
(Workspace.java:161)
	at org.eclipse.core.internal.resources.Workspace.endOperation
(Workspace.java(Compiled Code))
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1600)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:2711)
	at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run
(WorkbenchRunnableAdapter.java:42)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread
(ModalContext.java:302)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:758)
	at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish
(NewElementWizard.java:96)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed
(WizardDialog.java:608)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:321)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:89)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled 
Code))
	at org.eclipse.jface.window.Window.open(Window.java:563)
	at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:136)
	at org.eclipse.ui.internal.NewWizardDropDownAction.run
(NewWizardDropDownAction.java:96)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:456)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:403)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:397)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:72)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
Comment 11 Nick Edgar CLA 2003-03-31 19:42:25 EST
The stack trace is interesting, but it only gives us one data point.
When you say the workspace is busy for a long time, how long is long?
If you dump the stack multiple times during this period, does it always look 
the same?

Would you be able to try installing the Core Tools (v1.0.0) at the following 
URL and check out what's shown in the Builders/Listeners Spy view?
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-core-
home/dev.html#tools

This will show the activity of all builders and workspace listeners, and the 
time taken by them.
See the readme there for installation instructions.
After copying the .options file from eclipse/plugins/org.eclipse.core.resources 
to eclipse/, edit it to specify:
org.eclipse.core.resources/monitor/builders=true 
org.eclipse.core.resources/monitor/listeners=true

Thanks.
Comment 12 Ritchie Schacher CLA 2003-12-15 10:42:29 EST
As we discussed recently, there are a few approaches to solve this:

1)  Add exclusion filters which would allow us to replace the Java build path 
page with our own, based on the nature.  There are some limitations to this.
-A.  We don't want to copy all the code in the Java build path page and 
reference internal code.  There is some function in Java build path that we 
still want to keep, e.g., source folders, classes folders, libraries.
-B.  We actually have 3 different property pages that can modify the build path

2)  Change the build path page to use a notification based working copy of the 
Java build path.  The all our pages can use this as well.  When the working 
copy is changed, the property pages can refresh accordingly.

3)  Change the behavior of preferences such that changing the page will apply 
the changes.  Then all build path related pages need to refresh when they are 
re-focused.  Pages that force an autobuild would indicate this but the 
autobuild would not fire until the dialog is closed.

This issue is very important to our product, and we'd like to see some 
resolution in the 3.0 timeframe.
Comment 13 Nick Edgar CLA 2003-12-15 11:20:14 EST
Ritchie,

I was not privy to the recent discussions you refer to.
Also, the points above about the build path page seems unrelated to the topic 
of this PR (performance of open/close project).  Or am I missing something?
Comment 14 Ritchie Schacher CLA 2003-12-15 12:23:45 EST
Sorry, please disregard the last remark; it was a bugzilla blunder.  Wrong 
defect (should've been 32378).
Comment 15 John Arthorne CLA 2005-01-07 17:13:04 EST
I should mention that I have just moved the open/close project actions to run as
background jobs.  This might help your particular performance scenario, although
in this case it looks like classpath computation is taking the time, rather than
the actual open/close itself.  There was work on improving classpath computation
performance in 3.0 so this might no longer be an issue.
Comment 16 Tod Creasey CLA 2005-03-07 11:57:21 EST
Adding my name to the cc list as we are now tracking performance issues more
closely. Please remove the performance keyword if this is not a performance bug.
Comment 17 Mike Wilson CLA 2005-04-21 13:32:32 EDT
Given that the time seems to be in classpath computation, does this PR still belong in UI?
Comment 18 Nick Edgar CLA 2005-04-21 13:46:36 EDT
John, what's your take on this one?
Comment 19 John Arthorne CLA 2005-04-21 13:52:20 EDT
Given that:

 - The information in this bug is two years old
 - It's based on 2.1, and the world has significantly changed since then
 - I can't reproduce any exceptional slowness opening and closing projects in
current builds.
 - We only have one stack trace as a data point, and requests for more details
were not answered.

I suggest marking as INVALID or WORKSFORME.
Comment 20 Ritchie Schacher CLA 2005-04-21 13:55:26 EDT
How about FIXED?  It was valid at the time it was opened :-).
Comment 21 Nick Edgar CLA 2005-04-21 14:12:19 EDT
Ritchie, do you still have a similar workspace and are you using the latest 3.1?
If so, can you confirm that it's no longer a problem in your workspace?
Comment 22 Ritchie Schacher CLA 2005-04-21 15:11:07 EDT
I haven't seen this in quite some time.  I haven't updated to 3.1 yet.
Comment 23 Nick Edgar CLA 2005-04-21 15:45:54 EDT
Closing as WORKSFORME then.