Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 162969 - Directories are searched aggressively during Go to File
Directories are searched aggressively during Go to File
Status: RESOLVED FIXED
Product: utilities
Classification: Unclassified
Component: Jump To
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Alexey Butenko
Jiri Prox
: PERFORMANCE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-17 17:11 UTC by Petr Jiricka
Modified: 2009-05-11 11:40 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2009-04-17 17:11:54 UTC
This is a followup of issue 122639 (and 162144).

While the new implementation uses index to speed up the Go to File action, there are still inefficiencies that could
slow down the action for large projects. Here are the steps to reproduce:
1. Create a new Java web application.
2. Create a class p.NewClass in this application
3. Select Navigate -> Go to File and type "N"

In the first part of the algorithm, the index correctly retrieves the NewClass.java file, which matches the search
criteria. However, in the second part of the algorithm, folders are collected so files are found outside of the source
roots. After this phase (as I verified under debugger), allFolders.toString has the following value:

"[/Users/petrjiricka/NetBeansProjects/WebApplication29, /Users/petrjiricka/NetBeansProjects/WebApplication29/nbproject,
/Users/petrjiricka/NetBeansProjects/WebApplication29/nbproject/private,
/Users/petrjiricka/NetBeansProjects/WebApplication29/src, /Users/petrjiricka/NetBeansProjects/WebApplication29/src/conf,
/Users/petrjiricka/NetBeansProjects/WebApplication29/src/java,
/Users/petrjiricka/NetBeansProjects/WebApplication29/src/java/p]"

In the third phase, on all these folders, folder.getData(false) is called, so the algorithm enumerates all the files in
folder /Users/petrjiricka/NetBeansProjects/WebApplication29/src/java/p, although these have already been retrieved in
the first phase through the index! 

I expect that all folders which are covered by the index, will not be collected in the second part of the algorithm, and
their children will not be enumerated in the third part.
Comment 1 David Strupl 2009-04-17 17:36:37 UTC
Actually when Andrey explained the algorithm to us I thought he mentioned that the folders under the source roots are
*not* gone through in the final phase of the algorithm. Andrey?
Comment 2 David Strupl 2009-04-17 17:37:31 UTC
Adding Vita to Cc: ...
Comment 3 Petr Jiricka 2009-04-17 17:47:05 UTC
Of course, the cleanest way to fix this would be to implement indexing outside of source roots per issue 162580, which
would simplify the algorithm a lot (and speed it up). But I am not sure if that's doable for 6.7.
Comment 4 Andrey Yamkovoy 2009-04-17 22:36:00 UTC
Petr, David, I have expected the same algorithm as you described and I was talking with Alexey about it. So I am
surprised too. Reassign issue to Alexey who actually implemented this code.

Since no functionality is broken and performance not critical downgrade to P3.
Comment 5 Alexey Butenko 2009-04-20 12:36:19 UTC
Yup, I didn't take into account that sources can be placed not only in root folders. I will update the algorithm.
Comment 6 Alexey Butenko 2009-04-20 12:44:03 UTC
changeset 26398920070a

Reviewed by Andrey
Comment 7 eruvel 2009-04-29 16:05:29 UTC
Still not working in beta
Comment 8 Alexey Butenko 2009-04-30 08:24:48 UTC
Could describe what still not working in beta? Or attach project.
-> INCOMPLETE
Comment 9 Vitezslav Stejskal 2009-04-30 11:08:06 UTC
"Still not working in beta" - Well, AFAICT changeset 26398920070a did not make it to beta. So no, this issue was not
fixed in beta. Could you please test this in a dev build?
Comment 10 Alexey Butenko 2009-04-30 11:28:38 UTC
Ahh, yes, it is not in beta, because it was pushed after beta branch created.
But it will go to FCS or beta2.
Comment 11 David Strupl 2009-05-06 14:38:35 UTC
I assume this one can be marked as fixed, right?
Comment 12 Alexey Butenko 2009-05-06 14:56:30 UTC
Yes, mark as fixed
Comment 13 Michel Graciano 2009-05-07 20:47:52 UTC
I can't see the QA message about daily build. Could you confirm that it is already available for test?
Comment 14 Alexey Butenko 2009-05-08 06:49:09 UTC
It is available since Apr 20 in development builds
Comment 15 Vitezslav Stejskal 2009-05-11 11:40:44 UTC
It's in main-golden repository (http://hg.netbeans.org/main-golden/rev/26398920070a) and so it definitely is in daily
builds now.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo