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

vdr26:~/xmltv# time ./xmltv2vdrv5.pl -s -c channels.conf -x tvguide.xml

real    3m4.397s
user    2m50.475s
sys     0m6.052s

vdr26:~/xmltv# time ./xmltv2vdrv6.pl -s -c channels.conf -x tvguide.xml

real    3m4.309s
user    2m48.951s
sys     0m7.240s

xmltv2vdrv5 = the version I posted
xmltv2vdrv6 = the version I posted + the o switch on all regex + title
and subtitle now use regex and no more split.

about perl (from debian sarge) :
vdr26:~/xmltv# perl --version

This is perl, v5.8.4 built for i386-linux-thread-multi

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";

sub ProcessEpg
    # Find XML events

    foreach $xmlline (@xmllines)


open(XMLTV, "$xmltvfile") || die "cannot open xmltv file";

sub ProcessEpg

        while($xmlline = <XMLTV>)

Good idea, I have not thought about it (my wonderful Celeron 233 has
384Mo of Ram).

Thanks for your help.


vdr mailing list

Reply via email to