Tue, 06 Apr 2004




I notice that Blosxom uses a variation of the code that perl.com deems inefficient. I wonder if slurping would really speed it up all that much?

Currently, Blosxom (2.0) does something like this:

$fh->open("< $path_file"); chomp($title = <$fh>); chomp($body = join '', <$fh>);

Would it really make any difference to do something like this? (I don't know how to profile things, so maybe someone could teach me how to do test it, or better yet, figure it out for me.)

$fh->open("< $path_file"); chomp($title = <$fh>); { local( $/ ); $body = <$fh>

Just a thought. I found myself doing this as I try to construct a command-line trackback pinger.

What I also want to know regarding Blosxom is whether I can change the entry reading code (which is where the above fragment comes from) completely, and have it slurp XML files and interpolate using XSLT. Another project. Hmmm.

02:04:30 6 Apr 2004 > /computers/perl > permalink > 15 comments