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.
Various snapshots indicate that one reason for slowness of Go To Type dialog is the background refresh (triggered after main window being activated). It is supposed to watch for I/O load automatically, but it seems that it takes time before the I/O load is high enough. This needlessly steals I/O capacity desperatelly needed elsewhere. We need a hint that parsing API can use to suspend the background I/O manually.
Created attachment 98498 [details] priorityIO(Runnable)
VS01: How exactly is parsing.api meant to use this? Are all index queries meant to run as PE.priorityIO()? If so, parsing.api will need to depend on masterfs. Is it ok? VS02: PE.priorityIO's javadoc seems confusing - "Allows registered exceptions to execute..." - what 'exceptions'? Also the value of @Since tag is wrong. It should read 2.25, I think.
Thanks Jardo. I will try it and let you know. VS01: There are two use cases. 1st) TaskProcessor.runUserActionTask should become priorityIO. Several slowness in code completion, go to decl are caused by the background refresh. 2nd) The GoTo * should be guarded by the priority IO.
Created attachment 98521 [details] Problematic snapshot Here is one of the typical problematic snapshots.
Cau Jardo, can the runPriorityIO take rather MutexAction.ExceptionAction or Callable than Runnable. Runnable is problematic as the parsing API task may throw ParseException and it's hard to re throw it. Thanks
Created attachment 98576 [details] PriorityIO changed
I've rewritten the parsing.api to use the priorityIO. I've also changed: 1) priorityIO takes j.u.c.Callable<T> not Runnable. 2) I've made the method static as I've not found a way how to get an instance of ProvidedExtension (except of new ProvidedExtension()). If there is a way feel free to change it back to non static.
Thanks for refining my patch to be usable, Tomáši! If it is also beneficial (together with your changes), please proceed with integration.
Thanks Jardo, the patch improved the performance significantly. I will integrate it.
Integrated into jet-main 894fe07157c0
java.source: jet-main:c45560a7aa8c
Integrated into 'main-golden', will be available in build *201005112200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ User: Log: