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.
When NetBeans is started with an empty or non-existing user-directory and the user start working with anything Java-related, the Java module starts scanning the Java classpath soon. The scanning job comprises of creation of may files as the results of scanning/parsing are stored to cache (index) files in the user directory. Mercurial's interceptor intercepts each such a request for creation of an index file and asks the Mercurial cache about the cached Mercurial status of the file. Because the file's status is not known (as it has not been obtained before), a series of other routines is executed. This may be time-consuming but unneccessary. One possible cause of the above behaviour is that MercurialInterceptor calls FileStatusCache.getCachedStatus(file), which subsequently calls FileStatusCache.getCachedStatus(file, true), i.e. the second parameter ("seenInUI") is always true. This effectively disables the advantage of enhancement #176031 ("initial hg status scan only for visible folders"). Is it correct?
The situation you're describing would only happen when those index files were under mercurial control (inside a mercurial repository) which i think the are not (scanning stores it's cache inside ~/.netbeans/...). Are you saying that the mercurial interceptor handles these files? > the second parameter ("seenInUI") is always true i'll try to explain the meaning of the parameter to you when i come back to work. In short: true means that Netbeans is aware of such file (either is displayed as a node in UI or an event is caught by the interceptor - which is probably the situation where you expect it to be "false"). I think mercurial interceptor and cache behave correctly. IMO the problem is that unversioned files (index cache) are handled in the interceptor. Are you sure they are not inside a hg repository?
If you make your own build and run "ant tryme" from directory <srcroot>/nbbuild, the user-dir is <srcroot>/testuserdir. Because <srcroot> is versioned, the user-dir is versioned, too.
Sorry, closing as wontfix, we can't exclude the userdir from mercurial control ourselves, it's user's responsibility. You can either set the userdir manually (--userdir), or tell mercurial that you don't want to have the netbeans clone under version control - set property versioning.unversionedFolders: e.g. versioning.unversionedFolders=~/cdev