[mythtv] Depreciated calls to MythUIButtonListItem::setImage (MythImage *image, const QString &name="")

Stuart Morgan stuart at tase.co.uk
Wed Oct 15 18:28:54 UTC 2008


On Wednesday 15 October 2008 18:42:48 Paul Harrison wrote:
> In MythZoneMinder the analysis images shown on the event screen are only
> available on the server running ZM which is usually a separate machine
> on the network. MythZM gets these images over a socket from the server
> so there is no need for these images to ever hit the hard drive, whats
> more  it's not uncommon for there to be 10,000+ events available. It's
> not practical to copy and store all these on each FE that accesses them.
> Most users will probably only ever look at the images once anyway so
> there is no advantage to caching  them. What I do now is I get the
> images on demand from the server as the user scrolls in the grid. Even a
> slow celeron has no problem keeping up so there is really no need to
> cache these images. I'd really appreciate it if we could keep the
> ability to load images directly into MythUIButtonListItems.

I was aware that there maybe exceptions. I've no problem keeping the ability 
to load images directly, adding the deprecated attribute was more a reminder 
to myself that some plugins needed changing. Also as a note to others 
currently working with mythui that loading images directly should be 
discouraged.

I'd like if possible to think of a way to discourages it's use though even if 
we don't keep the attribute, that might be as simple as adding warnings to the 
documentation.

I can't think of many times when we wouldn't want to use the cache, even for 
images that don't have a long lifespan since the cache will eventually have 
the ability to cleanup behind itself based on frequency of access and last 
access times combined with a user modifiable cap on cache sizes (both memory 
and filesystem caches).

The speed gains of the cache are not just in the loading, but avoiding 
repeating transformations and scaling on every image. In addition to the 
reflection on offer now it's planned that to allow a range of static image 
effects and transformations e.g. Rotation, shear, warping.
-- 
Stuart Morgan


More information about the mythtv-dev mailing list