Skip to content

Suspicious indexing with dev build from master (NB 21) #6921

@mbien

Description

@mbien

Was testing something else when I noticed that NB is indexing JDK zips for almost 40s, repeating the test on NB 20 worked fine so it must be a recent change.

edit: bisection showed that #6329 seems to be the issue, checking out the commit before 192bb52 restores the behavior of NB 20. Clean revert isn't possible anymore which makes this a bit more tricky.

reproduce:

  1. start with fresh config, don't import config
  2. create maven project, open java file, jump into println method
  3. check log after a while (or observe the background process indicator)
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: jar:file:/usr/lib/jvm/default/lib/src.zip!/java.base/ took: 36,619 ms (New or modified files: 3,037, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 1 source roots took: 36,619 ms (New or modified files: 3,037, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 39,407 ms.

image

this is repeatable after restart, index update is only slightly faster:

INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Refresh of custom indexer ([text/x-java]) for root: jar:file:/usr/lib/jvm/default/lib/src.zip!/java.base/ forced by: org.netbeans.modules.java.source.indexing.JavaCustomIndexer$Factory@31aa22
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: jar:file:/usr/lib/jvm/default/lib/src.zip!/java.base/ took: 25,286 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 1 source roots took: 25,286 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 25,313 ms.

(NB 20 doesn't scan that zip after restarts and/or first start)

I did also notice other log lines:

INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /home/mbien/NetBeansProjects/netbeans/nbbuild/netbeans/webcommon/jsstubs/dom-stubs.zip took: 11,013 ms (New or modified files: 1,044, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /home/mbien/NetBeansProjects/netbeans/nbbuild/netbeans/webcommon/jsstubs/core-stubs.zip took: 398 ms (New or modified files: 106, Deleted files: 0) [Adding listeners took: 0 ms]

I am not quite sure why NB is trying to scan those zips.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Java[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)RegressionThis used to work!performancepriority:criticalShowstopper issue that requires fixing in next release

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions