Community
Participate
Working Groups
Is the Java Model thread-safe? If so, maybe the hierarchy view could populate itself on a background thread. Currently F4 takes between 6 and 10 seconds on my machine (preferences set to open the hierarchy perpsective). This is roughly the same delay we would experience in the Open Type dialog. I'm not sure what the breakdown is, but I guess that the hierarchy calculation is significant.
We did some performance improvements for 2.0 for the type hierarchy. Randy, can you provide some information regarding our machine. On my machine (P4 1.6 GHZ) opening the type hierarchy on Action (which is quite big) takes 6 seconds. A normal type hierarchy is 1 to 2 seconds.
On my machine (P3 1.13 GHz, 1024MB RAM), this operation takes roughly 10 seconds. I might have a few more classes loaded than you. I have more classes in my workspace than you do. Here is an interesting benchmark. Close the hierarchy View in the hierarchy perspective, then reopen it. For me this is clearly 90% of the delay in bringing up the Hierarchy Perspective. I like to work in multiple WorkbenchWindows (like VA-Java). One reason I use F4 is that it is the only way to open a new window, not necessarily because I need to see a hierarchy immediately. Making this a background thread would really improve the percieved responsiveness.
Created attachment 2750 [details] opening type hierarchy 91% of the time needed to open TH on Action is spent in jCore moving there for comment
Hierarchies are dynamically computed when needed (unlike VAJava were the built state was all in memory and used to produce hierarchies). In Eclipse, you can get hierarchies independantly from having built your sources. Some caching strategy could be investigated to save some time though.
Some API got added to persist/restore type hierarchies.
Added APIs to save/restore type hierarchies. Note that the client still has to register as a ITypeHierarchyChangedListener once restoration has occurred. ITypeHierarchy.store(OutputStream, IProgressMonitor) for saving a type hierarchy. IType.load(InputStream, IProgressMonitor) for restoring a previously saved hierarchy.
Verified.