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 234001 - Useless refresh all indices makes scanning time twice longer
Summary: Useless refresh all indices makes scanning time twice longer
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 7.4
Hardware: PC All
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-06 08:41 UTC by Tomas Zezula
Modified: 2013-08-09 10:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2013-08-06 08:41:01 UTC
Caused by org.netbeans.modules.csl.core.TasklistStateBackdoor.setScope invoking refreshAllIndices()

Steps to reproduce:
1) Open Task List, set scope All projects
2) Open java.source
3) Open java.source dependencies
4) 2 scans of each roots

Stacktrace:
	java.lang.Thread.getStackTrace(Thread.java:1567)
	org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:131)
	org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:124)
	org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.propertyChange(RepositoryUpdater.java:1040)
	java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
	java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
	org.netbeans.modules.parsing.impl.indexing.IndexerCache.getData(IndexerCache.java:505)
	org.netbeans.modules.parsing.impl.indexing.IndexerCache.getIndexersByName(IndexerCache.java:149)
	org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.addIndexingJob(RepositoryUpdater.java:478)
	org.netbeans.modules.parsing.api.indexing.IndexingManager.refreshAllIndices(IndexingManager.java:291)
	org.netbeans.modules.csl.core.TasklistStateBackdoor.setScope(TasklistStateBackdoor.java:102)
	org.netbeans.modules.tasklist.impl.TaskManagerImpl.attachPushScanners(TaskManagerImpl.java:210)
	org.netbeans.modules.tasklist.impl.TaskManagerImpl.doObserve(TaskManagerImpl.java:167)
	org.netbeans.modules.tasklist.impl.TaskManagerImpl.access$000(TaskManagerImpl.java:78)
	org.netbeans.modules.tasklist.impl.TaskManagerImpl$1.run(TaskManagerImpl.java:111)
	org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
	org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
Comment 1 Milutin Kristofic 2013-08-06 13:45:12 UTC
Svata you implemented Bug #218534, so you will better know if it is useless and can be removed.
Comment 2 Svata Dedic 2013-08-06 13:55:15 UTC
Tomasi - do you run the IDE with ergonomics ?
Comment 3 Tomas Zezula 2013-08-06 13:58:29 UTC
Yes, I have ergonomics but the modules were already enabled (no activation was done during the project opening).
Comment 4 Svata Dedic 2013-08-07 09:55:01 UTC
I've attempted to fix the TLStateBackdoor; now the scanning should be planned
only if TLIndexer already seen the state. Should not react to project switches.


However during scanning, the javascript2 adds its stub path to the global path
registry. The first scan after IDE start that wakes up javascript embedding
indexer MAY cancel itself and run again, because of this.

Fixed in http://hg.netbeans.org/jet-main/rev/09fd4f8122d8
Comment 5 Quality Engineering 2013-08-09 10:47:14 UTC
Integrated into 'main-silver', will be available in build *201308090746* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/09fd4f8122d8
User: Svata Dedic <sdedic@netbeans.org>
Log: #234001: only run the scanning if a now obsolete result was seen by TLIndexer