Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316381

Summary: FlatVirtualComponent's isChildModule lookup on binary files is slow
Product: [WebTools] WTP Java EE Tools Reporter: Jason Peterson <jasonpet>
Component: jst.j2eeAssignee: Jason Peterson <jasonpet>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc, jsholl, stryker
Version: 3.2Flags: cbridgha: review+
Target Milestone: 3.2.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
initial patch ccc: iplog+

Description Jason Peterson CLA 2010-06-09 16:46:24 EDT
FlatVirtualComponent uses the quickpeek taking an IPath to do type lookup on an archive to determine whether it is a child or not.  However, this quickpeek has no caching support (see feature bug 316132).  This causes performance issues everytime an archive file is encountered during traversals.  This fix is to create a virtualarchivecomponent and do a quick peek on that instead.  Not only is caching supported for this quick peek but all referenced archives are already loaded and cached on workspace startup.  

One area of concern is for the loose archives that are backed by projects.  These would not have been cached on startup since these are ignored and the backing projects are loaded.  The FlatVirtualComponent should really ignore these as well when traversing the root folder/s.
Comment 1 Jason Peterson CLA 2010-06-09 16:47:44 EDT
Created attachment 171577 [details]
initial patch
Comment 2 Rob Stryker CLA 2010-06-10 02:53:45 EDT
The patch looks good for what's needed, however:

>The FlatVirtualComponent should really ignore these as well when traversing the root folder/s.

No, the flat virtual component should not ignore jars backed by projects at all. The flat virtual component must investigate whether this jar / zip file is a child module or not. By ignoring it, there's no other way to discover this. You must give the participants a chance to investigate this. 

Not all virtual component types will expose jars sitting in their BlahContent folder as IVirtualReferences. It happens that jeetools does do this but other components may not. So you need the ability to investigate plain jars as well as references.
Comment 3 Chuck Bridgham CLA 2010-06-14 10:34:23 EDT
approved
Comment 4 Carl Anderson CLA 2010-06-17 09:15:59 EDT
Committed to HEAD for WTP 3.2.1 and WTP 3.3