Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316381 - FlatVirtualComponent's isChildModule lookup on binary files is slow
Summary: FlatVirtualComponent's isChildModule lookup on binary files is slow
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Jason Peterson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 16:46 EDT by Jason Peterson CLA
Modified: 2010-06-17 09:54 EDT (History)
3 users (show)

See Also:
cbridgha: review+


Attachments
initial patch (2.87 KB, patch)
2010-06-09 16:47 EDT, Jason Peterson CLA
ccc: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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