Nick Morrott
2010-09-04 07:31:33 UTC
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
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
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