Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2132 closed patch (fixed)

Caching of multible prescaled themes

Reported by: Sonni Nørløv <sonni.norlov@…> Owned by: danielk
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords: theme cache
Cc: Ticket locked: no

Description

Having a MythTv? box with multible displays, in my case a Television and a Projekter each using different screen resolutions MythTv? would prescale all theme images when started on the first display and later on the second and again when started on the first display.

The attached patch adds a new setting "Theme Cache Size" in "Setup -> Appearance -> Theme" which lets the user select the number of prescaled themes to cache. Default value is 1 which correspond to the current MythTv? implementation. Cached themes are removed when max size is reached. Oldest cached themes, based on directory timestamp, are removed first.

Patch can be applied to release-0-19-fixes/mythtv revision 10505

Attachments (1)

mythtv-0.19-themecachesize.patch (2.0 KB) - added by Sonni Nørløv <sonni.norlov@…> 18 years ago.

Download all attachments as: .zip

Change History (8)

Changed 18 years ago by Sonni Nørløv <sonni.norlov@…>

comment:1 Changed 18 years ago by danielk

Milestone: 0.21
Owner: changed from Isaac Richards to danielk
Version: 0.19head

comment:2 Changed 18 years ago by danielk

Resolution: fixed
Status: newclosed

(In [11374]) Fixes #2132. Allows you to increase the number of pre-cached theme resolutions, defaults to 1 resolution.

comment:3 Changed 18 years ago by tino.keitel+mythtv@…

I set the theme cache size to 2, but the frontend always rescales the theme images when changing the resolution. I use 2 possible resolutions: full screen (1680x1050) and 960x800. I thought that this patch should avoid the image rescaling when starting the frontend with another resolution than last time.

comment:4 in reply to:  3 Changed 18 years ago by sonni.norlov@…

You will always see the prescaling progress bars when you start the frontend. As the fronend still verifies that the cached images are valid. However you should see a much faster processing when the theme is already cached, it this you case ?

What does your frontend log say ? (grep for "cache dir") does it not say that it is keeping 2 cache dirs ?

comment:5 Changed 18 years ago by tino.keitel+mythtv@…

I don't see faster processing when the frontend starts with a different resolution. I always have to wait for a while.

$ mythfrontend --geometry 960x600 | grep -i cache 2006-10-04 10:05:15.273 Removing stale cache dir: /home/scorpion/.mythtv/themecache/Iulius.1680.1050

$ mythfrontend | grep -i cache 2006-10-04 10:05:54.835 Removing stale cache dir: /home/scorpion/.mythtv/themecache/Iulius.960.600

$ mythfrontend --geometry 960x600 | grep -i cache 2006-10-04 10:06:06.187 Removing stale cache dir: /home/scorpion/.mythtv/themecache/Iulius.1680.1050

mysql> SELECT * FROM settings WHERE value = "ThemeCacheSize?";

| ThemeCacheSize? | 5 | dose |

comment:6 in reply to:  5 Changed 18 years ago by sonni.norlov@…

Unfortunately I dont run svn, but looking at the svn code it appears to be as my patched 0.19 version.

Just out of the blue - are you sure that you are running the latest svn? what does the frontend report as its version? (although you have the ThemeCacheSize? option in you db..hmm)

When I run the scenario as you describe I only get "Removing stale cache dir" when the cache size has been reached, followed by a number of "Keeping cache dir" (cache size - 1)

Perhaps someone else running svn can confirm if it is working, anyone ?

comment:7 Changed 18 years ago by tino.keitel+mythtv@…

I only used the latest mythfrontend, not the latest libs. That's why I saw the setting in the user interface without being used at startup.

Sorry for the noise.

Note: See TracTickets for help on using tickets.