I have a project with bunch of libraries. When I add yet another one to the list of its libraries, the UI is completely frozen for few seconds and the I/O load is high. Stack trace shows:
"Parsing & Indexing Loop (100511-5b0ca7653b2c)"
My interpretation of this is that there is really huge amount of sigtest files from libraries and the system deletes them all, before it starts new round of indexing. This seems to take really long time.
My suggestion is to reimplement the deleteRecursively method. Instead of doing the delete, it shall just rename the folder to some temporary name. Then it shall do the delete in a background thread, possibly using the idleIO(Runnable) provided by the masterfs. As a result the UI will not be blocked, the system will delay the removal of old files until later and the user will sooner see the reindexed values.
Created attachment 99499 [details]
Result of self-profile and export to ... action, hopefully openable in NetBeans profiler
The main problem is that deleteRecursively is called even when not needed. In your case it probably should not be called at all.
I've changed the impl to not to call it when nothing changed. Delete only changed files when something has changed. deleteRecursively is called only when huge amount of crcs has changed (rare case).
Anyway I will will an enhancement to benefit from slowIO when available as an API (http://netbeans.org/bugzilla/show_bug.cgi?id=191316).
Fixed as described above in jet-main 4f78de51f641
Mentioned on http://wiki.netbeans.org/EditorPlan72 . Is there something to be done for 7.2 for this one?