NetBeans IDE is scanning/parsing/indexing for ages? Yeah, it's a bug!
By Petr Dvorak on Jun 19, 2009
"Scanning in progress..." - I believe that everyone have met the issue. You open some larger project and you can not use the NetBeans IDE for a few minutes until the sources are "scanned", whatever it means...
Some unsorted facts first
- scanning is needed and must be performed, otherwise features that need a knowledge of the source code structure (code completion, refactoring, go to ...) could not be used
- only the first scanning should be slow - the result is cached in your userdir ($HOME/.netbeans/$VERSION) and further parsing is incremental (only the part that is modified is scanned again)
- editor infrastructure is very new - Parsing API was introduced in 6.5 for Java and in 6.7 for other languages, therefore, some optimizations are not made yet (for example scanning files in a more intelligent order, allowing to use some features while scanning, etc.). Scanning itself is absolutely no problem - the problem is that the IDE is not very usable while scanning is in progress...
- scanning&indexing issues are the most commonly heard "deal-breakers" for the Netbeans IDE and the NetBeans dev team knows about them
Submitting scanning&indexing issues
If you are in the situation when the scanning&indexing takes too much time or if the IDE freezes during scanning a project, it is an issue. The only way to increase the chance someone is able to fix it is to submit the issue and to have enough patience to handle the issue (reply questions, provide more details, don't get offended by developer's questions/comments...).
Let's summarize what you need to do in order to file a useful bug report on scanning:
- In order to improve logging of the scanning related issues, please run IDE with a command-line switch that improves logging:
- Include the version of NetBeans, Java and OS in you report (copy information from Help>About) and attach IDE log file ($HOME/.netbeans/$VERSION/var/log/messages.log)
- Describe your problem as precisely as you can but please try to be brief too (these requirements are contradictory). Specifically for scanning issues, include the answers to following questions:
- Does the scanning ever finish?
- If yes, how long did it take?
- Was it only the first scan issue, or is the problem met whenever you open the project?
- If scanning didn't finish, did IDE freeze so that it needs to be killed?
- If yes, did the main window repaint (was AWT blocked)?
- What is your project type?
- How big is your project (number of classes, disk size, ...)?
- Does your project use some libraries (how many)?
- What is the structure of your project (i.e.: long "string of dependencies"...)?
- Is your project public, so that everyone can get the sources and open it?
- Do you use any version control system for your project?
- Is your project located on the network drive?