[mythtv] Ticket #3986: BOB interlacing makes EPG slow in latest SVN

Shane gnome42 at gmail.com
Wed Oct 3 15:05:34 UTC 2007

Hi Daniel,

I tracked down a similar killer performance regression the other day.
I thought it was mostly because I use a slow remote backend but the
symptoms are similar so I thought I would mention it.

It was the regex searches introduced in r14448 that caused the extra
load. This is the workaround I put in. I don't have any funky chars in
my channels so I'm not sure this doesn't breaks thing for those who

--- channelutil.cpp     (revision 14508)
+++ channelutil.cpp     (working copy)
@@ -1486,11 +1486,22 @@
     bool isIntA, isIntB;
     int a_int = a.channum.toUInt(&isIntA);
     int b_int = b.channum.toUInt(&isIntB);
+    if (isIntA && isIntB) // test big optimization
+    {
+        // both channels have a numeric channum
+        cmp = a_int - b_int;
+        if (cmp)
+            return cmp < 0;
+    }
     int a_major = a.major_chan;
     int b_major = b.major_chan;
     int a_minor = a.minor_chan;
     int b_minor = b.minor_chan;



More information about the mythtv-dev mailing list