﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
7913	Improve performance of playback startup	Jim Stichnoth <stichnot@…>	danielk	"This patch reduces the ""Please Wait...."" delay when starting playback.

On my ION frontends, starting playback takes at least 4 seconds.  About 650ms is spent in OSD::InitCC708().  This function calls LoadFont() 48 times (16 caption fonts times 3 font sizes), each instance taking about 15ms.  In the default MythTV setup, all 16 fonts are the same -- this patch detects that situation and reuses the fonts, saving about 600ms.  It may have an even greater residual effect, because log output like this:

  playCtx: StartDecoderThread(): took 2023 ms to start player.

changes to something like this:

  playCtx: StartDecoderThread(): took 930 ms to start player.

after the patch.

A better solution would be to cache the 48 fonts globally instead of creating and destroying them for every playback instance.  I would look into that after the conversion of OSD to MythUI is complete.  In the meantime, others with slow frontends may be interested in this patch."	patch	closed	major	0.23	MythTV - Video Playback	unknown	medium	fixed			0
