[mythtv] extremly slow mythfilldatabase in 0.28

Torbjorn Jansson torbjorn.jansson at mbox200.swipnet.se
Mon Jul 18 07:48:23 UTC 2016


On 2016-07-18 09:10, Karl Dietz wrote:
> On 17.07.2016 23:11, Jonatan Lindblad wrote:
>> Den 2016-07-17 kl. 19:08, skrev Torbjorn Jansson:
>>> On 2016-07-17 13:57, Roger Siddons wrote:
>>
>> <snip>
>>
>>>> The metagrabber shouldn't be run at all by MFD (AFAIK). Add the "-v
>>>> system" log option to confirm it isn't being invoked.
>>>
>>> looks like it is doing just that.
>>
>> The invocation of ttvdb.py seems to come from
>> https://code.mythtv.org/trac/browser/mythtv/mythtv/programs/mythfilldatabase/xmltvparser.cpp#L530.
>>
>>
>>
>> I'm not sure this was taken into account in b64be0f8, but calling the
>> script(s) for potentially every program seems a bit unnecessary. Unclear
>> if this is the cause for long runtime though.
>
> When I wrote that test there was no intention to call the grabber for
> each and every programme.
> My hacking time is limited at the moment, so feel free to adjust it to
> store the configuration variables in global variable or similar.
> An easy first optimization might be to split the condition into two, to
> avoid the expensive test (that presumably calls the grabber now) if the
> attribute does not match the expected string.
>
> https://github.com/MythTV/mythtv/blob/master/mythtv/programs/mythfilldatabase/xmltvparser.cpp#L519-L539
>

i commented out those lines and reran mythfilldatabase.
the long delay after:
CoreContext filldata.cpp:421 (GrabData) - ------------------ End of 
XMLTV output ------------------
is now gone so i think those lines is the source of the slowdowns.

of course since i commented out those lines it it now needs to update 
every single program there is so on first run it spams the database 
quite a lot but overall it still is quicker.

i'll restore those lines since i don't want inetrefs to get screwed up.



More information about the mythtv-dev mailing list