Bug 206028 - [search] Improve dummy search query performance
Summary: [search] Improve dummy search query performance
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2007-10-11 07:56 EDT by Eric Jodet CLA
Modified: 2007-10-29 08:45 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Jodet CLA 2007-10-11 07:56:11 EDT
Version: 3.4.0
Build id: I20071010-1200

Same scenario as per bug 206027.

For the // dummy query for waiting until the indexes are ready part of the JavaCore#initializeAfterLoad operation, the Yourkit snapshot taken gave 2 hotspots:

1 - (35%) org.eclipse.jdt.internal.core.search.PatternSearchJob.getIndexes(IProgressMonitor)
2 - (42%) org.eclipse.jdt.internal.core.search.JavaSearchScope.add(JavaProject, IPath, int, HashSet, IClasspathEntry)
Comment 1 Frederic Fusier CLA 2007-10-12 08:03:36 EDT
These ratio were taken in trace mode and are not really significant. Using sampling mode shows following numbers:
JavaCore.initializeAfterLoad(IProgressMonitor)		3,375	97 %
  SearchEngine.searchAllTypeNames(...)    		3,125	90 %
    BasicSearchEngine.searchAllTypeNames(...)		3,125	90 %
      JobManager.performConcurrentJob(...)    		3,125	90 %
        PatternSearchJob.ensureReadyToRun()		1,656	48 %
          PatternSearchJob.getIndexes(IProgressMonitor)	1,656	48 %
            IndexManager.getIndex(...)			1,390	40 %
              Index.<init>				1,156	33 %
            SimpleLookupTable.keyForValue(Object)	  187	 5 %
            JavaSearchParticipant.selectIndexes(...)	   31	 1 %
            IndexManager.getIndex(IPath)		   15	 0 %
        PatternSearchJob.execute(IProgressMonitor)	1,468	42 %
      SearchEngine.createWorkspaceScope()		  171	 5 %

Most of the time (70%) of the PatternSearchJob.getIndexes(IPM) is spent in index file stream creation and, unfortunately, there's nothing we can do about this.

Time to create the workspace scope is around 5% of the search all type names request and so, any performance improvement in this area would not be noticeable...

Finally, note that the time of initializeAfterLoad is around 3.3 seconds but PDE initialization is around 1mn on this huge workspace. So, even if we did reduce JDT/Core initialization time by 2, it would be still less than 3% on whole Java Tooling Initialization time...

So, close as INVALID as it looks more than a problem with the yourkit measure than a real performance issue.
Comment 2 David Audel CLA 2007-10-29 08:45:54 EDT
Verified for 3.4M3 using I20071029-0010 build.