[mythtv-users] MythGallery: selecting a favorite picture as directory thumb

Angela angela.schmid at wolke7.net
Wed Nov 5 17:21:15 UTC 2014


> On 05/11/14 14:18, Roger Siddons wrote:
> >
> > Master is currently using the services API. I'm running a version that
> > uses the internal protocol but I've no idea if that affects its speed.
> >
> > I'm assume you're talking about ~28 folders, each with 4 thumbnails. I
> > notice its sluggish when the BE is busy because the thumbnail reads
> > are competing with threadedfilewriter. But with an idle BE I see it
> > fill a lot quicker.
> >
> > However that should only be an issue once, after a scan, as the FE
> > fills its thumbnail cache in ~/.mythtv/cache/themecache/<theme>.
> > Thereafter I see them load instantaneously from the FE cache.
> >
> The problem seems to be the call to GalleryViewHelper::LoadTreeData()
> which causes a swarm of SQL queries and Service API calls. Some
directories
> are taking 30 seconds to load here.

>DO NOT try rotating/flipping your photos until the patch appears. It
destroys the image exiv data.
Thanks for the advice, I didn't expect the exif data be changed, as there is
a table attribute. Which patch?

Every directory change always involves a call to the BE, I don't think the
local cache is used, as I see the same IDs called
galleryfilehelper.cpp:431 (SendRequest) - GalleryFileHelper SendRequest ok
[http://127.0.0.1:6544/Image/CreateThumbnail?Id=33774]
I didn't debug, you think something might be wrong?

For every 100 pictures it takes 3 seconds. So for the 28x4, it also takes
around 3 seconds.

Waiting for a first time thumbnail generation is no problem, but the
behavior should be changed to that of the "old" gallery.
The "old" gallery enters a directory instantaneously and starts the
thumbnail generation (however sometimes I need to start viewing a picture,
to get the process starting).
The "new" gallery first calls for all pictures the API, retrieves the
thumbnails and then enters the directory. 


>> Is it the preferred design to create/retrieve the thumbnails from the BE
>> instead of letting the FE create and retrieve thumbnails from a 
>> thumbcache?
>>
>https://code.mythtv.org/trac/changeset/549fb22e1726c9cb7cde8b9b0bd0e040706a
c24f/mythtv

You are saying, it is the preferred design. Sure you have to be gentle to
your BE.

How about a remote FE, is a NFS-alike connection needed or is it possible to
receive pictures via a service API?
IMHO, when a NFS-alike connection still is needed, accessing a directory is
much faster than SQL (sure the "old" gallery calls SQL to get rotating
information), but synchronizing doesn't have to be done. It is different for
MythVideo, as Directory Browse Mode is slower to retrieve a complete
gallery, meaning it has to scan the whole tree at once. In the gallery we
only have a tree view, or are any other views (e.g. based on labels, which
would be kept in the DB) desirable?





More information about the mythtv-users mailing list