[Aptitude-devel] Experimental package and package_pool implementation
Daniel Burrows
dburrows at google.com
Wed Jul 14 22:55:37 UTC 2010
On Wed, Jul 14, 2010 at 3:51 PM, Piotr Galiszewski <piotr at galiszewski.pl> wrote:
> 2010/7/14 Daniel Burrows <dburrows at google.com>:
>> Another minor optimization of the pool: do you think you could
>> store a Package * instead of a PkgIterator in the "package" object? A
>> PkgIterator actually just bundles a pointer to the cache with a
>> Package * object, so if you're copying every package into your pool,
>> you'll end up with a ton of pointers to the same cache. Similarly for
>> your versions.
>>
>> I don't do this in most places in aptitude, but since you're building
>> a big pile of references to packages, it's probably worth it. There's
>> some similar code in aptitude_resolver_universe.h if you want
>> something to compare to.
>>
>
> I tried to do this and it is quite problematic, because most aptitude
> function I use requires iterators. Also there is a public method,
> which returns iterator. When I tested previous versions of the patch
> it works nice with iterators, so probably I will leave it for a
> moment (if it is acceptable)
No problem. Maybe I'll patch it myself to make it use Package*.
Daniel
More information about the Aptitude-devel
mailing list