Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332095 - [query] Repository query takes a long time when deleting a lot of IUs (from dropins)
Summary: [query] Repository query takes a long time when deleting a lot of IUs (from d...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6.2   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 324353
Blocks:
  Show dependency tree
 
Reported: 2010-12-07 18:07 EST by DJ Houghton CLA
Modified: 2010-12-20 11:58 EST (History)
3 users (show)

See Also:


Attachments
patch (1.72 KB, patch)
2010-12-07 18:09 EST, DJ Houghton CLA
no flags Details | Diff
org.eclipse.equinox.p2.directorywatcher_1.0.202.R36x_v20100727 (26.08 KB, application/java-archive)
2010-12-08 16:52 EST, DJ Houghton CLA
no flags Details
org.eclipse.equinox.p2.directorywatcher_1.0.203.R36x_v20101027 (26.08 KB, application/java-archive)
2010-12-14 09:58 EST, DJ Houghton CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2010-12-07 18:07:05 EST
Cloned to track release into R3.6.x stream.

+++ This bug was initially created as a clone of Bug #324353 +++

Created an attachment (id=178100)
profile output

This is a bug to address part 2 of bug 313953. Thomas, sorry I missed your questions in the original bug. Yes, there are almost 6000 files on disk which have been removed.

- copy test data (3000 features, 3000 plugins) to dropins folder
- start Eclipse
- shutdown
- delete all plugins and features except 1 of each
- start Eclipse
- this start takes almost 10min. 

Here is the query that we are performing:

// create a query that will identify all ius related to removed files.
// It's safe to compare a String with a File since the auto coercion will
// first convert the String into a File.
IQuery<IInstallableUnit> removeQuery = QueryUtil.createMatchQuery( //
	"$1.exists(x | properties[$0] == x)", FILE_NAME, removedFiles); //$NON-NLS-1$
IQueryResult<IInstallableUnit> toRemove = metadataRepository.query(removeQuery, null);
metadataRepository.removeInstallableUnits(toRemove.toUnmodifiableSet());

Thomas, is there a way we could re-write the query or do something differently here?
Comment 1 DJ Houghton CLA 2010-12-07 18:09:56 EST
Created attachment 184764 [details]
patch
Comment 2 DJ Houghton CLA 2010-12-08 16:52:17 EST
Created attachment 184820 [details]
org.eclipse.equinox.p2.directorywatcher_1.0.202.R36x_v20100727

JAR for testing.
Comment 3 DJ Houghton CLA 2010-12-14 09:58:25 EST
Created attachment 185136 [details]
org.eclipse.equinox.p2.directorywatcher_1.0.203.R36x_v20101027
Comment 4 DJ Houghton CLA 2010-12-20 11:58:29 EST
Patch released to maintenance branch.