At 11:36 Uhr -0500 23.01.2003, Carsten Klapp wrote:
I wrote: "a typical "fink list" that has to update the index". So it was a dirty database, and it did rebuild it therefore. So it was mostly identical to a run of "fink index". I guess that would have been a better command for the example :-)On Thursday, January 23, 2003, at 09:07 am, Max Horn wrote:Wow - seems we spend a *lot* of time in expand_percent! If we can optimize that function and/or reduce the places in which it is used, that might indeed pay off well.Hi,
Disclaimer: this has to be taken with a grain of salt: by the nature of how profiler's work, they often overstress the time spent in tiny functions.
Sorry to report I do not see similar results for "fink list". However, for me the slowest fink operation is always "fink index", where Fink::Services::expand_percent does seem significant.
Paul's percent expansion patch cut about 20 seconds off of "fink index",
Nice!
Hm, I don't see how it could increase the "fink list"... Anyway, I noticed a big variation in run times, depending on whether the /sw/fink/dists dir was in the HD cache or not, what other programs are running, if there is disk activity or not. So for reliable numbers, I guess fink should be run a couple hundred/thousand times and an avarage of this be calculated.but increased a full "fink list" by 3 seconds or so (may be coincidence).
Yes this agrees mostly with what I get here for a normal (no DB rebuild) fink list - well the times are different, but the relative order is comparable (and is more or less what I expected).
I only ran each test once so there is no time averaging of results to eliminate the factor of the CPUs being busy with other tasks. I ran two of the tests a second time (results not included) and the times varied by only about one second.
Carsten
System: 10.2.3, Dual-450
Trees: stable, unstable and experimental
---
TEST A1: Reference test, compare with Max's test
List subset of packages. ("text")
% sudo perl -w -d:DProf /sw/bin/fink list text
Password:
Information about 2282 packages read in 26 seconds.
<snip>
% dprofpp
Total Elapsed Time = 26.42965 Seconds
User+System Time = 7.350856 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
71.5 5.260 26.911 222 0.0237 0.1212 Fink::Package::search_comparedb
16.6 1.220 1.220 1 1.2200 1.2200 Storable::pretrieve
4.61 0.339 0.229 4731 0.0001 0.0000 Fcntl::S_ISDIR
3.13 0.230 0.230 1 0.2300 0.2300 Fink::Status::read
2.99 0.220 0.088 9462 0.0000 0.0000 Fcntl::__ANON__
2.18 0.160 0.236 10 0.0160 0.0236 Fink::Package::BEGIN
1.03 0.076 7.105 1 0.0762 7.1051 Fink::Package::scan_all
0.82 0.060 0.060 7 0.0086 0.0086 AutoLoader::AUTOLOAD
0.82 0.060 0.067 13 0.0046 0.0052 Fink::PkgVersion::BEGIN
0.54 0.040 0.049 1 0.0398 0.0492 Fink::Services::get_term_width
0.41 0.030 0.030 4 0.0075 0.0075 DynaLoader::dl_load_file
0.41 0.030 0.030 20 0.0015 0.0015 Fink::Services::expand_percent
0.41 0.030 0.050 3 0.0100 0.0166 AutoLoader::import
0.41 0.030 0.265 10 0.0030 0.0265 Fink::Engine::BEGIN
0.27 0.020 0.020 22 0.0009 0.0009 Exporter::export
I'll try Paul's patch.
Max
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel