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.

Bug 223997 - Rapid calls to IndexingManager.refreshAll from VCS
Summary: Rapid calls to IndexingManager.refreshAll from VCS
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 20:17 UTC by Exceptions Reporter
Modified: 2013-01-03 02:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 196731


Attachments
stacktrace (4.71 KB, text/plain)
2012-12-18 20:17 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2012-12-18 20:17:54 UTC
This issue was reported manually by sdedic.
It already has 1 duplicates 


Build: NetBeans IDE 7.3 Beta 2 (Build 201211062253)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05
OS: Windows 7

User Comments:
GUEST: copied SVN-versioned folder into another SVN-versioned folder (another project), then tried to cancel endless background scanning




Stacktrace: 
java.lang.Exception: Scan canceled.
   at java.lang.Thread.getStackTrace(Thread.java:1567)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:115)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:108)
   at org.netbeans.modules.parsing.api.indexing.IndexingManager.refreshAll(IndexingManager.java:411)
   at org.netbeans.modules.parsing.api.indexing.IndexingManager.refreshAllIndices(IndexingManager.java:369)
   at org.netbeans.modules.versioning.indexingbridge.Bridge$1.call(Bridge.java:63)
Comment 1 Exceptions Reporter 2012-12-18 20:17:56 UTC
Created attachment 129518 [details]
stacktrace
Comment 2 Svata Dedic 2012-12-18 20:21:20 UTC
Please see the exception report's message log. VCS events result in rapid re-scanning, results in a seemingly neverending background scan.
Comment 3 Svata Dedic 2012-12-18 20:25:00 UTC
Found other reports for GIT -> changing component to general one
Comment 4 Ondrej Vrabec 2012-12-18 21:47:13 UTC
I can try and move copy/delete/move commands outside of the indexing bridge (run the commands without it). But is it the right way? I thought that was the goal of the indexing bridge - to run versioning commands manipulating with source files with bked indexing (inside the indexing bridge) and start the scanning only after the command finishes.
Comment 5 Svata Dedic 2012-12-19 14:29:47 UTC
As the org.netbeans.modules.versioning.indexingbridge.Bridge is implemented, it really protects IndexingManager from interrupting of events during the single VCS operation. 
But the logs seem to record multiple calls to IndexingBridge itself, each of which schedules a refresh task (refreshAllIndices). Each of the refresh tasks ignores the fs events, but they are still executed one after each other, so even if they don't cancel each other, they still spend CPU on prolog/epilog/management of the change indexing.

Isn't there a way how to batch them ?
Comment 6 Ondrej Vrabec 2013-01-02 10:08:14 UTC
fix: http://hg.netbeans.org/core-main/rev/e66b1f5f7f1f
Comment 7 Quality Engineering 2013-01-03 02:40:33 UTC
Integrated into 'main-golden', will be available in build *201301030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e66b1f5f7f1f
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #223997 - Rapid calls to IndexingManager.refreshAll from VCS
Disconnecting the IndexingBridge in case of FS operations, they should already be invoked inside an AtomicAction which blocks the indexing anyway.