[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Performance of tagfile scanning and similar things

On Tue, Nov 20, 2001 at 04:40:57PM -0700, Jason Gunthorpe <jgg@debian.org> was heard to say:
> On Tue, 20 Nov 2001, Daniel Burrows wrote:
> >   This code is called once per package (to build a list of which
> > packages are in each task)  If I make it always return an empty list,
> > the performance is reasonable even on low-end machines.  Similarly,
> Unless you sort the list of versions by location on the disk the runtime
> can be quite slow indeed. 'apt-cache dumpavail' is about what you are
> doing and you can measure how fast it runs vs what you are up to.

  Ok.  I think the best way to deal with this is to build a table of
package (or, I guess version) -> task mappings...the code that's calling
this now will ask for packages in essentially arbitrary order.
  (I was hoping the answer would be something like this, actually)

  So something like LocalityCompare (apt-cache.cc) will do this
properly, right?

> That fact that you are seeing 1s on a modern box vs 30 mins reported
> suggests it is thrashing the disk cache.

  Yes, I think so too..after running a few more tests I realized it runs
fairly slowly even on my system the *first* time.  Subsequent runs are
about 1s.  Disk caching it is.

  Ok, I think I can solve this pretty straightforwardly. (for some
values of "straightforwardly" :) )

   Many thanks,

/-------------------- Daniel Burrows <dburrows@debian.org> -------------------\
|                If we do not change our direction                            |
|                we are likely to end up where we are headed.                 |
\----------------- The Turtle Moves! -- http://www.lspace.org ----------------/

Reply to: