[Aptitude-devel] Experimental package and package_pool implementation
Piotr Galiszewski
piotr at galiszewski.pl
Thu Jul 15 17:05:35 UTC 2010
2010/7/15 Daniel Burrows <dburrows at google.com>:
> 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
>
Today I have rebased my later patches to current code. Unfortunately
there is one big problem with package_pool. Creating package list
takes nearly 17 seconds on my machine. The problem is with
boost::multi_index_container. I have changed this to std::vector and
time is 0.3s now.
There are also some problems with my boost::optional usage. I will
push new version shortly probably with some numbers about viewing and
sorting performance
--
Regards
Piotr Galiszewski
More information about the Aptitude-devel
mailing list