Bug 190842

Summary: do not instanciate a SourceMapper when no source attached
Product: [Eclipse Project] JDT Reporter: Eric Jodet <eric_jodet>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED WONTFIX QA Contact:
Severity: normal    
Priority: P3 Keywords: performance
Version: 3.3   
Target Milestone: 3.5 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Eric Jodet CLA 2007-06-04 12:35:05 EDT
Version: 3.3.0
Build id: I20070601-1539

see bug 190094 for the context.
see also bug 190840

Test scenario:
- have a type that inherits a class located in a big JAR
- open this type in the Java editor, press Crtl+O twice to show inherited
members

in PackageFragmentRoot#getSourceMapper():
if (sourcePath == null)
	mapper = createSourceMapper(getPath(), rootPath); // attach root to itself
else
	mapper = createSourceMapper(sourcePath, rootPath);

we create a source mapper even if no source available.

If we know that this resource has no source in it, then we should avoid creating a SourceMapper, to prevent further reading of corresponding zip file.
Comment 1 Jerome Lanneluc CLA 2007-06-20 10:20:57 EDT
Performance work
Comment 2 Jerome Lanneluc CLA 2008-05-07 07:53:17 EDT
Deferring post 3.4
Comment 3 Jerome Lanneluc CLA 2008-06-10 09:30:32 EDT
Actually to know that the jar doesn't contain any source, we need a source mapper. And we need to read at least once the jar to know this. No further action planned.
Comment 4 Kent Johnson CLA 2008-08-06 14:38:54 EDT
Verified for 3.5M1 using I20080805-1307