Bug 90431

Summary: Improve path lookup in scopes
Product: [Eclipse Project] JDT Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: performance
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jerome Lanneluc CLA 2005-04-06 07:46:07 EDT
I20050401

We currently store the container path (either the project path or the jar path)
in the index as the document name. This means that the JavaSearchScope needs to
compare strings starting with the same characters. This is an area of
performance improvement.
Comment 1 Jerome Lanneluc CLA 2005-04-07 06:39:18 EDT
Changed indexing to store container relative paths for the document names, and
changed search to handle container relative paths.

On a full source workspace, querying all type names goes from 790ms down to
711ms (wall-clock time) on my machine. This is a 10% gain.

Also note that other changes (using Strings instead of IPaths, hashing on the
container path to avaoid looking at all paths in a scope) released since 3.1 M6
made the same query go from 1150ms to 790ms. That was a 31% gain.

So the total gain is 38%.
Comment 2 Frederic Fusier CLA 2005-05-11 09:51:21 EDT
Verified for 3.1 M7 using last available performance results:
http://fullmoon.torolab.ibm.com/downloads/drops/N20050509-0010/performance/org.eclipse.jdt.core.php?
Search>Name>Workspaces (corresponding to searchAllTypeNames API method test)
fingerprints show a gain over 50% whatever machine on which this test was run