Bug 459614 - Bottleneck in ModelManager.determineIfOnBuildpath
Summary: Bottleneck in ModelManager.determineIfOnBuildpath
Status: NEW
Alias: None
Product: DLTK
Classification: Technology
Component: Common (show other bugs)
Version: 5.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: dltk.common-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2015-02-10 18:10 EST by Dawid Pakula CLA
Modified: 2015-02-10 18:10 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Pakula CLA 2015-02-10 18:10:29 EST
This method is directly used by ModelManager.determineIfOnBuildPath and indirectly by DLTKCore.createSourceModule() so also by H2Index.

In JDT this method is based on entire buildPath() persisted after resolve in ProjectInfo. 

DLTK use different approach, it ignore resolvedBuildPath saved in ProjectInfo and build own (ScriptProject#getResourceOnlyResolvedBuildpath) based on "con" entiries only, so on larger projects where buildpath is more complicated than 3 patches this take some time and slowing down entire searching. For example I see 10% cpu time for entire PDT content assist on my test project (slowest part is call to ScriptProject#addToResult in resolveBuildPath method).

Because I don't know why ModelManager cannot just use ScriptProject#getResolvedBuildpath I have a proposition to persist result from ScriptProject#getResourceOnlyResolvedBuildpath in ProjectInfo on second field.