Bug 571277

Summary: [performance] improve workplace refresh
Product: [Eclipse Project] Platform Reporter: Jörg Kubitz <jkubitz-eclipse>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: loskutov
Version: 4.19   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Screnshot of VisualVM 2.0.5 during full build showing hotspot
none
Screenshot showing weird lookup stacktrace
none
Stacktrace without Egit none

Description Jörg Kubitz CLA 2021-02-18 01:52:28 EST
Created attachment 285586 [details]
Screnshot of VisualVM 2.0.5 during full build showing hotspot

We have a big workplace where the refresh after each java build uses a lot of CPU time (20sec) for lookup the DeltaDataTree nodes.
It feels like there might be some optimization to either avoid
 ElementTree.includes(IPath) in Workspace.getResourceInfo(IPath,,)
or introduce some DataStructure (HashMap or Tree) to eliminate the 2 loops in 
 DeltaDataTree.lookup(IPath) 

Suggestions welcome.
Comment 1 Jörg Kubitz CLA 2021-02-18 02:00:25 EST
Created attachment 285587 [details]
Screenshot showing weird lookup stacktrace
Comment 2 Andrey Loskutov CLA 2021-02-18 02:30:14 EST
EGit is responsible for the part of the stack in the middle. Could you remove that and measure again?
Comment 3 Jörg Kubitz CLA 2021-02-18 04:36:48 EST
Created attachment 285591 [details]
Stacktrace without Egit

I "removed" Egit by disconnecting all Projects.
Unfortunatly our eclipse TEA then fail to perform a full build without git.
However the Project/Clean../All action reveals almost the same problematic pattern and similar timing in the stacktrace - without egit. So i guess we can exclude egit from being the root reason.