Discussion:
[Xmltv-devel] tv_find_grabbers speedup
Nick Morrott
2010-09-04 07:31:33 UTC
Permalink
I've just committed one of a few possible solutions to help with the
problem of tv_find_grabbers taking a while to complete, especially on
slower systems. I discussed this problem at a recent local LUG
meeting, and have implemented one of the discussed "hacks" to speed
things up. In testing, the observed speedup is approx 7x (1.7s vs
11.5s) on my slow AMD64 3000+ system.

By default (this behaviour could be reversed), tv_find_grabbers will
now search the source code of all grabbers found for capabilities and
description information, before the grabber is compiled and run. The
regexes used support grabbers using the older
XMLTV::Capabilities/Description modules and grabbers using the newer
XMLTV::Options module, but expect a somewhat standard format of the
text to make the matching easier.

If information is not found using these regexes, the grabber is run as
per the previous version of tv_find_grabbers, and the output of
--capabilities and --description is used. A --slow option is also
provided to allow for the old behaviour to be used exclusively, where
all grabbers are called with the above run-time options.

Another option discussed was placing additional information in a
__DATA__ section of the bottom of each grabber file for
tv_find_grabbers to locate - this may or may not be more efficient
than the changes I have made, but they would require every grabber be
updated to take advantage of this. With a small change made to _ee,
the script finds all installed grabbers on my system as they are.

Thoughts/comments/improvements?

Cheers,
Nick
--
Nick Morrott

MythTV Official wiki: http://mythtv.org/wiki/
MythTV users list archive: http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin
Karl Dietz
2010-09-06 17:21:21 UTC
Permalink
Post by Nick Morrott
If information is not found using these regexes, the grabber is run as
per the previous version of tv_find_grabbers, and the output of
Thoughts/comments/improvements?
I like it. One small improvement would be avoiding to run
tv_grab_it_dvb and tv_grab_na_icons which is the last two scripts that
needs to be compiled in the default configuration.

Regards,
Karl
Nick Morrott
2010-09-07 09:01:08 UTC
Permalink
Post by Karl Dietz
Post by Nick Morrott
If information is not found using these regexes, the grabber is run as
per the previous version of tv_find_grabbers, and the output of
Thoughts/comments/improvements?
I like it. One small improvement would be avoiding to run
tv_grab_it_dvb and tv_grab_na_icons which is the last two scripts that
needs to be compiled in the default configuration.
Would there ever be a situation when these should be compiled/run by
tv_find_grabbers? Will they ever have capabilities/descriptions that
can be queried like the other grabbers?

This can wait for another day now that 0.5.58 is out (thanks Robert) -
I hope that the speedups will be sufficient for the timebeing.

Cheers,
Nick
--
Nick Morrott

MythTV Official wiki: http://mythtv.org/wiki/
MythTV users list archive: http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin
Karl Dietz
2010-10-21 22:33:10 UTC
Permalink
Post by Nick Morrott
Post by Karl Dietz
I like it. One small improvement would be avoiding to run
tv_grab_it_dvb and tv_grab_na_icons which is the last two scripts that
needs to be compiled in the default configuration.
Would there ever be a situation when these should be compiled/run by
tv_find_grabbers? Will they ever have capabilities/descriptions that
can be queried like the other grabbers?
If I understand correctly _it_dvb is a normal grabber that gets it's
data from a satelite instead of the internet. (aka has other
dependencies) But from the view of the consuming application it's just
some tv_grab_* that emits a xmltv file. (and it's just a question of
time until it works for Linux, *BSD, Solaris as they all seem to start
using the Linux DVB api)
todo:
add $Id$ to XMLTV::Version
fix Capabilities (it's a good candidate for prefer=allatonce btw)
adjust Description to mention that it needs a DVB-S card

For _na_icons I agree, can't see when that would ever be a valid result
from tv_find_grabbers, maybe just filter it out or add some "ignoreme"
marker ;) Might as well just rename it, but then it's not named similar
to the matching grabber anymore.

Regards,
Karl

Loading...