|Re: [p2-dev] Review wanted. Simplifying the IQueryResult/IQuery API|
I doubt that. I think it's rather the opposite given the number of unnecessary collection copies that were removed.
I have not reviewed the patch but I'm not a big fan of the removal of size and toCollection.
They end up being particularly useful in some places, especially to convert from one type to the other, or eventually create collections with the right size up front (which saves a lot of growth when you work on very large collections).
I agree that there are cases where all the IUs can't be held in memory, however there are cases in today's code (engine and planner) where I don't see how not having all the IUs in memory is possible, and where the presence of such methods is necessary.
In the end I think I could probably leave without the toCollection, but loosing size would likely cause performance issues.