Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327798 - ResolvedInstallableUnits are not 'member providers'
Summary: ResolvedInstallableUnits are not 'member providers'
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 RC2   Edit
Assignee: Ian Bull CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 12:30 EDT by Ian Bull CLA
Modified: 2011-05-20 20:51 EDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (3.86 KB, patch)
2010-10-14 13:42 EDT, Ian Bull CLA
pascal: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2010-10-14 12:30:08 EDT
We use 'member providers' in p2ql as a way of making objects 'inspectable'.  If an object is not a member provider, then the p2ql engine must use refelection each time the object is accessed.  Since ResolvedIUs are not 'member providers' these IUs take a long time to process.
Comment 1 Ian Bull CLA 2010-10-14 13:42:31 EDT
Created attachment 180897 [details]
Patch v1

Here is a patch that adds 'member provider' support to the Resolved IU.
Comment 2 Pascal Rapicault CLA 2010-12-23 22:56:19 EST
In which circumstances are we being hit by this?
CC'ing Thomas has we likely want him to review the patch.
Comment 3 Ian Bull CLA 2011-05-05 18:53:46 EDT
We are being hit by this if we query ResolvedIUs. After we plan, we end up with resolved IUs in our collections, and these queries end up being slower.
Comment 4 Pascal Rapicault CLA 2011-05-05 22:43:53 EDT
Thomas, could you please take a look at Ian patch? It applies still fine and it seems good, but I would rather have your opinion on it, especially that late in the cycle. Thx.
Comment 5 Thomas Hallgren CLA 2011-05-09 16:21:38 EDT
The patch looks good but I have two questions:

1. Why is 'original' and 'fragments' are exposed as members? They are not part of the API. Do we have special queries that need access to them?

2. Why are all the original members redeclared and not reused? They are public in InstallableUnit class that resides in the same package, so why the redundancy?
Comment 6 Pascal Rapicault CLA 2011-05-09 23:11:29 EDT
I've cleaned up the patch to avoid the duplication of the constants. I have left the declaration of original and fragments for now since I assume this could be used to write queries in very specific circumstances (e.g. processing a list of know resolved IUs). I'll let Ian decide if we should keep it or not.
I have released the version of this adapted patch.
Comment 7 Thomas Watson CLA 2011-05-20 15:37:06 EDT
Why is this bug still open?
Comment 8 Ian Bull CLA 2011-05-20 15:54:35 EDT
Yes, I put those there so you could write specific queries. It's all internal, so I don't think there is any harm. 

Pascal, did you actually commit to this to RC1 (you committed on the 9th)?  You have a +1 on the patch and Tomas H. looked at this too, so I think we are good.
Comment 9 Pascal Rapicault CLA 2011-05-20 20:51:36 EDT
I kept that opened because I had comments for Ian to address and he was away when I released this.