[mythtv] tracking the cause of channel change slowness

Pekka Jääskeläinen pekka.jaaskelainen at gmail.com
Sun Feb 19 19:50:30 UTC 2006

Note to myself (and to others possibly interested):

I've tracked the slowdown deeper in case of ScanStreams().
It seems that eventually the OSD gets rescaled to the new stream, twice:

TIMELOG: Reinit at osd.cpp:290 to Reinit at osd.cpp:313 took 0.914 s
TIMELOG: Reinit at osd.cpp:290 to Reinit at osd.cpp:313 took 0.712 s

The heavy piece of code is the following loop:

    QMap<QString, OSDSet *>::iterator sets = setMap.begin();
    for (; sets != setMap.end(); ++sets)
        if (!(*sets))

        int sub_xoff  = xoffset;
        int sub_yoff  = yoffset;
        int sub_dispw = displaywidth;
        int sub_disph = displayheight;
        if ((*sets)->GetName() == "cc_page" && needPillarBox)
            // widescreen -- need to "pillarbox" captions
            sub_dispw = (int)(wscale * 4.0f*displayheight/3.0f);
            sub_disph = displayheight;
            sub_xoff = xoffset + (displaywidth-sub_dispw)/2;
            sub_yoff = yoffset;
        (*sets)->Reinit(osdBounds.width(), osdBounds.height(),
                        sub_xoff, sub_yoff, sub_dispw, sub_disph,
                        wmult, hmult, frameint);

I'll try avoiding executing this code during the channel change, at
least the second time. Maybe cache the information of the last
Reinit() arguments so it's not
done if it's not necessary. Ideas?


More information about the mythtv-dev mailing list