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.
The patch below should be appropriate.
--- /sw/lib/perl5/Fink/Services.pm.orig Tue Jan 14 22:46:15 2003
+++ /sw/lib/perl5/Fink/Services.pm.new Thu Jan 23 15:58:28 2003
@@ -272,9 +272,8 @@
# which do stuff like %N = %n-shlibs). Hence we repeate the expansion
# if necessary.
for ($i = 0; $i < 2 ; $i++) {
- while (($key, $value) = each %$map) {
- $s =~ s/\%$key/$value/g;
- }
+ my $percent_keys = join('|', keys %$map);
+ $s =~ s/\%($percent_keys)/$map->{$1}/eg;
last if not $s =~ /\%/; # Abort early if no percent symbols are left
}
--
Paul Gaborit -- <http://www.enstimac.fr/~gaborit/>
DR/GI -- <http://www.enstimac.fr/dr/gind/>
Perl en français -- <http://www.enstimac.fr/Perl/>
-------------------------------------------------------
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