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 250854

Summary: Extremly slow search in files
Product: utilities Reporter: NukemBy
Component: SearchAssignee: Jaroslav Havlin <jhavlin>
Status: NEW ---    
Severity: normal CC: markiewb
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description NukemBy 2015-03-03 09:18:50 UTC
Netbeans is unreasonably slow when searching for text in files. I use text search rather frequently, but typically has to search outside of IDE because other tools are 10 times quicker (really 10 times),

Try getting set of sources for sample project as described here: 
https://netbeans.org/bugzilla/show_bug.cgi?id=250833

1. In NetBeans:

   Edit->Find In Projects ...
      Text: ManagedCollectionAdapter
      MatchCase: false
      Whole Words: false
      Scope: Open Projects
      Pattern: *.java

   Search completes in ~40 seconds

2. In IntelliJ IDEA
   
   Edit->Find->Find In Path ...
      Scope: "Whole Project"
      "The rest" is "the same"

   Search completes in ~4 seconds

3. FAR File Manager, Windows (http://www.farmanager.com/download.php?l=en)

   - go to root folder
   - ALT+F7 -> ...
      File Mask: *.java
      Containing text: ManagedCollectionAdapter
      Search area: From the current folder

   Search completes in ~4 seconds
Comment 1 Jaroslav Havlin 2015-08-17 08:04:41 UTC
The search is probably slow due to choosing of correct encoding of files.
First, the project must be found, to get its settings and default encoding.
This should be significantly faster in NetBeans 8.1 thanks to fixed bug 253950.

Thank you for providing the sample project. I'll try compare performance of 8.0.2 and the latest development build.
Comment 2 NukemBy 2015-08-17 10:28:51 UTC
May it relate or not - since I've found no way to make NetNeans autodetect (or select) correct encoding on per-file basis I start NetBeans with the option "-J-Dfile.encoding=UTF-8" to enforce UTF-8 for all files.