But it didn't help at all with my benchmark. ... For information that change has no impact on my bench.
Interesting, what version of Perl are you running if those changes don't do anything?
---
Futher improvement is that now it is unnecessary to read whole XML-file into memory, as the file is linearly scanned through. So no need to waste 5MB of memory if you are short of it.
-- # Read all the XMLTV stuff into memory - quicker parsing open(XMLTV, "$xmltvfile") || die "cannot open xmltv file"; @xmllines=<XMLTV>; close(XMLTV);
sub ProcessEpg # Find XML events
foreach $xmlline (@xmllines)
--
=> open(XMLTV, "$xmltvfile") || die "cannot open xmltv file";
sub ProcessEpg
while($xmlline = <XMLTV>)