Bug 96939 - Browse for Folder spends a really long time to display folder hierarchy
Summary: Browse for Folder spends a really long time to display folder hierarchy
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-05-27 06:05 EDT by Frederic Fusier CLA
Modified: 2006-03-16 10:38 EST (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 Frederic Fusier CLA 2005-05-27 06:05:08 EDT
Using build I20050527-0010.

I want to import existing project in my workspace. So, I use Import wizard ->
Existing Project into Workspace...
Then I want to Select root directory and click on "Browse..." button.
Folders hierachy of my box appears in "Browse For Folder" dialog, but when I try
to expand one, it takes several seconds before display the expanded folder
(between 20 and 25 seconds) whatever the number of sub-folders to display...

I got no problem with windows explorer which displays sub-folders quasi
instantaneously... I have no other processes running which can explain this
slowness.

Here's a VM snapshot which s the same even repeated several times:
Full thread dump Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode):

"Worker-61" prio=5 tid=0x042f4ed0 nid=0x224 in Object.wait() [635f000..635fd8c]
        at java.lang.Object.wait(Native Method)
        at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:167)
        - locked <0x1289b530> (a org.eclipse.core.internal.jobs.WorkerPool)
        at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:199)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)

"Worker-55" prio=5 tid=0x042b0088 nid=0xf08 in Object.wait() [7c4f000..7c4fd8c]
        at java.lang.Object.wait(Native Method)
        at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:167)
        - locked <0x1289b530> (a org.eclipse.core.internal.jobs.WorkerPool)
        at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:199)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)

"org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon prio=2 tid=0x042b6b58
nid=0x544 in Object.wait() [65df000..65dfd8c]
        at java.lang.Object.wait(Native Method)
        at
org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:176)
        - locked <0x134ce628> (a org.eclipse.jface.text.reconciler.DirtyRegionQueue)

"org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon prio=2 tid=0x040c9988
nid=0xd58 in Object.wait() [5c9f000..5c9fd8c]
        at java.lang.Object.wait(Native Method)
        at
org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:176)
        - locked <0x1315c140> (a org.eclipse.jface.text.reconciler.DirtyRegionQueue)

"YJP Listener Thread" daemon prio=5 tid=0x040285d8 nid=0xae4 runnable
[6b2f000..6b2fd8c]
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
        - locked <0x12cab388> (a java.net.PlainSocketImpl)
        at java.net.ServerSocket.implAccept(ServerSocket.java:448)
        at java.net.ServerSocket.accept(ServerSocket.java:419)
        at com.yourkit.b.a.a(a:138)
        at com.yourkit.b.a.run(a:62)

"Java indexing" daemon prio=4 tid=0x0401a4d8 nid=0x8cc in Object.wait()
[6a2f000..6a2fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x12c9a7d8> (a
org.eclipse.jdt.internal.core.search.indexing.IndexManager)
        at java.lang.Object.wait(Object.java:429)
        at
org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:349)
        - locked <0x12c9a7d8> (a
org.eclipse.jdt.internal.core.search.indexing.IndexManager)
        at java.lang.Thread.run(Thread.java:534)

"Memory Monitor" daemon prio=2 tid=0x0343eee0 nid=0xd08 waiting on condition
[4f5f000..4f5fd8c]
        at java.lang.Thread.sleep(Native Method)
        at
de.kyrsoft.memmonitor.views.MemoryView$1$MemoryUpdater.run(MemoryView.java:504)

"Start Level Event Dispatcher" daemon prio=5 tid=0x034a7488 nid=0x35c in
Object.wait() [378f000..378fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x127a4178> (a
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
        at java.lang.Object.wait(Object.java:429)
        at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:348)
        - locked <0x127a4178> (a
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
        at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:286)

"Framework Event Dispatcher" daemon prio=5 tid=0x0339ca68 nid=0x354 in
Object.wait() [368f000..368fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x12799d78> (a
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
        at java.lang.Object.wait(Object.java:429)
        at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:348)
        - locked <0x12799d78> (a
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
        at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:286)

"Signal Dispatcher" daemon prio=10 tid=0x0003de98 nid=0x88c waiting on condition
[0..0]

"Finalizer" daemon prio=9 tid=0x009c0da0 nid=0xfc4 in Object.wait()
[2f8f000..2f8fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x1277d550> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
        - locked <0x1277d550> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x009bf970 nid=0xd74 in Object.wait()
[2e8f000..2e8fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x1277d5b8> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:429)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
        - locked <0x1277d5b8> (a java.lang.ref.Reference$Lock)

"main" prio=7 tid=0x00035970 nid=0xa60 runnable [7e000..7fc40]
        at org.eclipse.swt.internal.win32.OS.SHBrowseForFolderW(Native Method)
        at org.eclipse.swt.internal.win32.OS.SHBrowseForFolder(OS.java:2356)
        at org.eclipse.swt.widgets.DirectoryDialog.open(DirectoryDialog.java:225)
        at
org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage.handleLocationDirectoryButtonPressed(WizardProjectsImportPage.java:874)
        at
org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage$6.widgetSelected(WizardProjectsImportPage.java:469)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:844)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2929)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2562)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:809)
        at org.eclipse.jface.window.Window.open(Window.java:787)
        at
org.eclipse.ui.actions.ImportResourcesAction.run(ImportResourcesAction.java:159)
        at
org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167)
        at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
        at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
        at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:844)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2929)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2562)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1694)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1658)
        at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:366)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
        at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:375)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:162)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
        at org.eclipse.core.launcher.Main.run(Main.java:973)
        at org.eclipse.core.launcher.Main.main(Main.java:948)

"VM Thread" prio=5 tid=0x009fb720 nid=0xae0 runnable

"VM Periodic Task Thread" prio=10 tid=0x009fc6b8 nid=0x2b4 waiting on condition
"Suspend Checker Thread" prio=10 tid=0x0003d550 nid=0xa0c runnable
Comment 1 Kim Horne CLA 2005-05-27 08:19:11 EDT
The file chooser dialog is owned by SWT.  Punting for comment.
Comment 2 Steve Northover CLA 2005-05-30 12:19:55 EDT
I've seen this before in other applications that use the native directory 
dialog.  Not sure this has anything to do with SWT.
Comment 3 Michael Baehr CLA 2005-07-15 03:53:40 EDT
Haven't seen this effect outside of Eclipse (but then again, I didn't use much
other software lately ...).
Interestingly, if you switch to a different application and then back,
everything is fine (folder expanded really quick). Otherwise, it takes a really
long time to expand a folder, while the cpu is at 100% (javaw.exe is using all
of it).
I just setup a new laptop, and I have the effect right away. Isn't there
anything that can be done?
Comment 4 Roy Paterson CLA 2006-01-27 12:27:33 EST
I also have this same problem.  I have a 1.7Ghz laptop with 1G of RAM, and I'm not running anything else of consequence besides Eclipse.  All of the other eclipse functions run plenty fast, but this one dialog is inordinately slow.  Note that if I browse for a file the UI is very quick and responsive, but if I browse for a folder it is very slow.
Comment 5 Morris CLA 2006-03-07 03:19:22 EST
I am new to this.
This problem is very irritating.
When can we expect a fix?
Comment 6 Steve Northover CLA 2006-03-13 20:44:41 EST
Can you guys try the latest and let me know whether it is fixed?  There was a bug in this area (around M4?) that caused the badness.  I can't find the bug right now ...
Comment 7 Roy Paterson CLA 2006-03-14 10:25:28 EST
I still see the same bad behavior on M5a.
Comment 8 Morris CLA 2006-03-15 11:16:43 EST
Most of the time it is fast now. Sometimes slow.
Where can i see if i have M4 or M5a ??
Comment 9 Frederic Fusier CLA 2006-03-16 06:26:33 EST
It's OK for me with build I20060307-1315 :-)
It's now quite instantaneous to display subfolders. I seldom got a longer time to open it (around 1 or 2 seconds), but nothing really irritating...
So, I consider this issue as fixed.
Comment 10 Steve Northover CLA 2006-03-16 10:38:18 EST
Ok, marking WORKSFORME because I can't find the original bug to mark it a duplicate.