I used the perl profiler on Fink to see what the biggest bottlenecks are in a typical "fink list" that has to update the index. The result was indeed surprising to me :-)

First off, if you want to do such tests yourself, this command will create a "tmon.out" file in the current directory with the profiling data:

sudo perl -w -d:DProf /sw/bin/fink list text

And to analyze it, use the dprofpp tool, e.g. run in the same directory:

dprofpp


[dyn129-hg:/tmp] maxhorn% dprofpp
Total Elapsed Time = 104.9121 Seconds
User+System Time = 26.63669 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c Name
28.8 7.690 7.569 9668 0.0008 0.0008 Fink::Services::expand_percent
19.8 5.275 21.109 3117 0.0017 0.0068 Fink::PkgVersion::initialize
18.4 4.914 4.878 3114 0.0016 0.0016 Fink::Services::read_properties_li
nes
10.4 2.793 6.834 2112 0.0013 0.0032 Fink::Services::read_properties
7.92 2.110 2.110 1 2.1100 2.1100 Storable::pstore
7.07 1.884 6.387 30477 0.0001 0.0002 Fink::PkgVersion::expand_percent_i
f_available
6.45 1.718 1.068 48324 0.0000 0.0000 Fink::Base::has_param
5.35 1.426 22.455 3117 0.0005 0.0072 Fink::Base::new_from_properties
4.01 1.069 0.803 19811 0.0001 0.0000 Fink::Base::param_default
3.00 0.799 0.754 3393 0.0002 0.0002 File::Find::Follow_SymLink
1.76 0.469 0.259 15632 0.0000 0.0000 Fink::PkgVersion::get_name
1.64 0.436 27.824 6 0.0726 4.6374 Fink::Package::scan
1.54 0.409 0.364 3393 0.0001 0.0001 Fink::Package::__ANON__
1.50 0.399 0.424 3117 0.0001 0.0001 Fink::Package::add_version
1.45 0.387 7.006 1002 0.0004 0.0070 Fink::PkgVersion::add_splitoff
[dyn129-hg:/tmp] maxhorn%


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.
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.


Cheers,

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

Reply via email to