[mythtv-users] MythGallery: selecting a favorite picture as directory thumb
Roger Siddons
dizygotheca at ntlworld.com
Thu Nov 6 22:11:58 UTC 2014
On Wed, 05 Nov 2014 17:21:15 -0000, Angela <angela.schmid at wolke7.net>
wrote:
>> On 05/11/14 14:18, Roger Siddons wrote:
>> 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?
92c73773d
Orientation changes are written to the image exif. Otherwise any changes
will be lost on a rescan. The db is rebuilt from scratch when
synchronising.
> 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?
They're requests to ensure the thumbnails exist on the BE. I have a fix
that reduces it to ~0.5s (and could be optimised further) but it's not the
cause of the slow thumb loading once the page has changed.
Once the thumbnails have been loaded then they should appear instantly
(from FE cache in ~/.mythtv/cache/themecache/<theme>) on subsequent
transitions, after the page has actually changed that is.
> For every 100 pictures it takes 3 seconds. So for the 28x4, it also takes
> around 3 seconds.
Thumbnails are only loaded on-demand, ie. for one page at a time. The
default widget uses 28 widgets so 27 sub-folders is the worst case and the
only way to display 100 thumbnails. I have few sub-folders so hadn't
initially noticed this issue. If you're looking at the logs then its not
loading the whole directory - it's loading the same pictures repeatedly!
>
> 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
That's my understanding. Otherwise remote FE's and clients of the API
would have to request all of the actual images from the BE just to show a
'gallery view'. That would be slow...
> 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?
Remote FE's will use the same internal protocol as local FE's. The service
API will serve pics to clients. No NFS needed. That's the point of the
changes.
> 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?
Sounds a good idea. We'd have to preserve the tags between scans, ie. do a
proper synchronise rather than dump & rebuild.
I was planning some schema changes so mail me off-list with what you need
in the db.
More information about the mythtv-users
mailing list