Date: Wed, 13 Jun 2007 14:21:00 -0700 (PDT) From: youshi10@u.washington.edu To: Tim Kientzle <kientzle@freebsd.org> Cc: hackers@freebsd.org Subject: Re: Using shell commands versus C equivalents Message-ID: <Pine.LNX.4.43.0706131421010.18410@hymn01.u.washington.edu> In-Reply-To: <46703EE9.1030804@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 13 Jun 2007, Tim Kientzle wrote: >>>> Next step, eliminating the linked list structure in favor or red-black >>>> trees, maybe. >>> >>> Due to the way pkg_install works, this most likely is just adding >>> complexity for no gain, it might actually slow it down. >> >> Hmmm... the only thing is that it does the linked list traversal a number of >> times per dependency. I'll take a look in gdb at the size of each dependency >> and then confer with Kirill (my mentor) about that a bit more. > > If you tend to look for the same few items over and over, > just move items to the front of the list as soon as you > find them. Alternatively, if you know you won't look for > this item ever again, move it to the end of the list or > remove it from the list entirely. > > Simple tricks like this can greatly speed things up with > almost no effort. Better yet, do easy things like this first; > if they help, then look at more complex approaches. > > As Joerg said, though, you're not likely to gain much from > this. pkg_install is almost entirely disk bound. > > I spent a lot of time recently in libarchive/bsdtar optimizing > the disk handling; I can share lots of ideas for improving > performance of disk-bound operations like this. > > Tim Kientzle Thank you Tim. I'll definitely keep that in mind :). -Garrett PS I'm looking at pkg_install and pkg_version mostly, but I'll be looking into the other package utilities closely in the next couple weeks, evaluating what approaches I should take in solving some bottlenecks with installing packages and ports. My goals are up on <http://wiki.freebsd.org/GarrettCooper>, and will be modified soon.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.43.0706131421010.18410>