[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] another m5 migration issue

See below
 
I'm wondering why the queries are executed twice,the code in
CompoundQuery::query (~line 48) looks like this:
                       if (!isMatchQuery) {
                               // If it is not a MatchQuery then we
must query the results.
                               collector = results.query(query,
collector, subMonitor.newChild(10));
                       } ....

I'm pretty sure I'm doing something wrong, but running the same query
twice seems to be a performance issue if there is no good reason for it
anyway, so I might be on to something. Still, please feel free to
suggest alternative, more p2-friendly ways for achieving what I'm trying
to do.. :)
 
What you're talking about here is a CompoundQueryable.  That is, several queryables treated as a single unit. Think of this as Three Queryables(X, Y, Z), and you want to treat this as 1

In this case, lets say:
X: EMF 1.9 EMF 1.7
Y: EMF 2.0 EMF 1.4 EMF 1.3 EMF 1.2
Z:EMF 1.0 and EMF 3.0

In order to query the Latest version of EMF, you can't simply perform a LatestIU on each repo and hope that works.  You would get 3 answers.  The other option is to Select * from each repo and then perform the query on the results.  This would be bad if each repository contained lots of elements. The third way is to query each repo and then query the results.  This does not work in general, but it does work in all current p2 queries.

I have a general solution, but for simplicity we haven't included it. You can see it at [1]

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=261758

cheers,
ian




 


TIA,
Ciao, hh

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev



--
R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource