Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324176 - Dirty resources get re-index upon each query
Summary: Dirty resources get re-index upon each query
Status: RESOLVED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Query2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-01 06:05 EDT by Axel Uhl CLA
Modified: 2010-12-17 03:05 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Uhl CLA 2010-09-01 06:05:01 EDT
Build Identifier: Query2 Prototype

When a query2 query is executed, all resources in the ResourceSet are re-visited for integration in a dirty-index, even in case they haven't changed since the last query. This causes a series of subsequent queries to perform very badly in case there is a significant amount of resources loaded in the ResourceSet.

Reproducible: Always

Steps to Reproduce:
1. Load a few large Resources into a ResourceSet
2. Fire the same MQL query using query2
3. Observe how the Resources in the ResourceSet get indexed for each query
Comment 1 saurav sarkar CLA 2010-12-17 03:04:30 EST
Hi Axel, 

An EContentAdapter called 'DirtyResourceFactory' has been introduced.This Adapter keeps track of the dirty index for a Query scenario.

This adapter has to be attached to the resource set or resources before the querying scenario and can be removed after user is done with the operation.

Please check Java Doc in the classes for more details.

Working of the DirtyResourceFactory, how it should be attached and removed have been captured in TestQueryBugs.java test class.

Please check the 'testDirtyResourceFactory_Bug324176' method in that class.

Best Regards,
Saurav
Comment 2 saurav sarkar CLA 2010-12-17 03:05:04 EST
Closing the bug