Beefy Boxes and Bandwidth Generously Provided by pair Networks
Joe No such thing as a small change  (crazyinsomniac) Re:
Performance quandary  by crazyinsomniac (Prior) on Feb 23, 2002
at 08:48 UTC ( #147054=note: print w/ replies, xml ) Need Help??
in reply to Performance quandary  I have at least 2 things to
tell you about. My comments start with ##  sub add_entry {
$log->print("Entering add_entry.", 3); my ($md5, $method, $key,
$exists, $children) = @_; my ($parent, $parentmd5,
$parentchildren); unless ( $children ) { $children = ''; } ##
useless use of join ## "$key $exists $children" better used here
$urldb->db_put($md5, (join(' ', $key, $exists, $children))); #
It's an old entry--it already has parents. Can leave. ## useless
use of a regular expression ## if( index($children,':') != -1) {
# better used here if ( $children =~ ':' ) { return; } $parent =
find_parent($key); # No more parents, or can't parent
ourselves... if ( $parent eq "http:/" or $parent eq $key ) {
return; } $parentmd5 = uc(md5_hex($me