Bug 95244 - performance optimization in SourceMapper.computeAllRootPaths
Summary: performance optimization in SourceMapper.computeAllRootPaths
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-13 20:20 EDT by John Wiegand CLA
Modified: 2005-05-27 06:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Wiegand CLA 2005-05-13 20:20:06 EDT
M7 candidate.

turned verbose on.  For the 1.4.2 src.zip, the following change improved the 
time to compute the root path from 450ms to 170ms.

optimization is to assume that most first level package names are already in 
the collection so check this first before doing any further analysis (since if 
it is already in the collection, we know we won't have to add it!)

code snippet follows:

							if (!
firstLevelPackageNames.contains(firstLevelPackageName)) {
								IStatus status 
= JavaConventions.validatePackageName(firstLevelPackageName);
								if (status.isOK
() || status.getSeverity() == IStatus.WARNING) {
								
	firstLevelPackageNames.add(firstLevelPackageName);
								}
							}
Comment 1 Olivier Thomann CLA 2005-05-17 23:09:54 EDT
Fixed and released in HEAD.
Comment 2 Frederic Fusier CLA 2005-05-27 06:25:46 EDT
Verified for 3.1 RC1 with build I20050527-0010.