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.
Summary: | Give parsing API chance to suspend background refresh | ||
---|---|---|---|
Product: | platform | Reporter: | Jaroslav Tulach <jtulach> |
Component: | Filesystems | Assignee: | Tomas Zezula <tzezula> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | apireviews, tzezula |
Priority: | P1 | Keywords: | API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | Other | ||
OS: | Linux | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 177274 | ||
Attachments: |
priorityIO(Runnable)
Problematic snapshot PriorityIO changed |
Description
Jaroslav Tulach
2010-05-05 15:25:19 UTC
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: |