Bug 27925

Summary: Openable.hasChildren is slow
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 Keywords: performance
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
expanding/collapsing nodes in packeage explorer 2 none

Description Adam Kiezun CLA 2002-12-09 05:28:31 EST
quite often i see Openable.hasChildren consume a lot of time on various 
operations
Comment 1 Adam Kiezun CLA 2002-12-09 05:29:48 EST
Created attachment 2721 [details]
expanding/collapsing nodes in packeage explorer 2

like expanding/collapsing nodes in the package explorer
where it consumes almost 67%
Comment 2 Philipe Mulet CLA 2002-12-09 05:58:46 EST
It has to do some work: i.e. open the corrresponding resource and expand it to 
find out that it has some children.

Maybe we could always answer true on some kinds of resources (like JARs)...

Do you have particular scenarii where it specially takes some time ?
Comment 3 Adam Kiezun CLA 2002-12-09 10:32:49 EST
the scenario is expanding a node in the package expolorer (project or source 
folder)
Comment 4 Adam Kiezun CLA 2002-12-09 10:33:04 EST
*** Bug 27924 has been marked as a duplicate of this bug. ***
Comment 5 Jerome Lanneluc CLA 2002-12-09 12:03:34 EST
Adam, how do you take the measure? When I expand a node, I don't have time to 
start and stop the CPU profiler. Do you have a test case where expanding a node 
takes more than half a second?
Comment 6 Adam Kiezun CLA 2002-12-09 12:58:27 EST
try Jeff's bigworkspace
start profiling before expanding
stop after expanding
Comment 7 Jerome Lanneluc CLA 2002-12-10 05:02:48 EST
When doing so, I see it takes 165ms in AbstractTreeViewer.handleTreeExpand() to 
expand the tree on the 'org.eclipse.core.tests.resources' node. Which node did 
you chose to get 1003ms in AbstractTreeViewer.handleTreeExpand()?
Comment 8 Adam Kiezun CLA 2002-12-11 07:52:37 EST
try expanding org.eclipse.swt
Comment 9 Jerome Lanneluc CLA 2002-12-16 12:21:26 EST
I now see 187ms spent in hasChildren when expanding org.eclipse.swt.

Closing.