This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 153356 [details] OpenProjects+BgScan.npss This is fork from that issues: https://netbeans.org/bugzilla/show_bug.cgi?id=250833 Use-case is: - Start empty NetBeans and switch to a Project Group ... - ... it contains large multi-module MAVEN project (300 modules, 7000 source files). - It takes 1.5 minute to open and I feel there is some space to improve performance. During 'Open Project Group' action there are two phases: 1. Open Projects - takes 45 seconds 2. Background Scan - takes 40 seconds This issue is about "phase 2" - "Background Scan". Attached is the full selfsampler for the whole action. Part after first 45 seconds are relevant (with around last 2 seconds while I was stopping profiler). Things that I feel can be improved: * bgscan-CssIndexer$1-run-17800ms.png --> bgscan-QuerySupport-findRoots-17700ms.png Really much time is spent in CssIndexer which in turn calls QuerySupport.findRoots() what consumes 99.5% of the CssIndexer. * bgscan-JavaCustomIndexer$Factory-scanStarted-7600ms.png Most of the time it waits for something else, but there is some significant CPU usage to beginStandardTransaction() * bgscan-APTUtils-get-3500ms.png It seems to me something is not well-cached here
Created attachment 153357 [details] bgscan-CssIndexer$1-run-17800ms.png
Created attachment 153358 [details] bgscan-QuerySupport-findRoots-17700ms.png
Created attachment 153359 [details] bgscan-JavaCustomIndexer$Factory-scanStarted-7600ms.png
Created attachment 153360 [details] bgscan-APTUtils-get-3500ms.png
Created attachment 153361 [details] bgscan-IndexingSuport-isValid-2100ms.png
One more thing * bgscan-IndexingSuport-isValid-2100ms.png Not sure what "isValid()" is doing, but it consumes 2 secs of CPU time. Seems too much for 'is' method.
Created attachment 153362 [details] bgscan-IndexingSuport-isValid-2100ms.png
Created attachment 153376 [details] Switch+Project+Group-6mins.npss
One more use-case (around 6 minutes of total time) ... - Opened a project group (300 modules) - Attached to target JVM for debugging - Noticed that i'm using wrong Project Group - target JVM process is running from 'release' branch, while i opened 'dev' branch - Closed current 'dev' project group (set Project Group = none) ... 6 minutes start from here ... - Started opening 'release' project group (same 300 modules, but with slightly different sources) - Went away for coffee ... - ... returned in around 2 mins hoping to start working and got background scan at only around '40%' - Started Self profiler - bgscan progress bar was slowly going until 100% and after that (12:51:40 in selfprofiler) something was still bg-scanned without progressbar for around 50 seconds. Selfprofiler is attached - Switch+Project+Group-6mins.npss Did not try to dig deep this time. Just noticed that JsfCustomIndexer took around 80 seconds of CPU time.