Fwd: Re: Breaking changes in file layout
Andreas Schleth <schleth_es-S0/[email protected]> Mon, 6 Apr 2020 18:47:53 +0200
| Newsgroups | gmane.comp.kde.kimdaba |
|---|---|
| Message-ID | <[email protected]> |
this should have gone to the list ... Andreas Hi Johannes, moving the thumbnails away to a local user folder would lead to a different thumbnail set for each user and, thus, to duplicate thumbnails. Right now, I manually fix the file permissions on the various thumbnails with chmod -R ug+rw to allow access for different members of the family. Our common database resides on NFS and is accessed via different computers with different screen resolutions. As for now, this has worked with only occasional hiccups that can be fixed by cleaning up the permissions. With our current setup I have around 4,5 GB worth of thumbnails and videoThumbnails laying around. That would at least double and clog my backups. Also it takes a several hours to regenerate all these thumbnails. Especially the video thumbnails take a while. As you know, thumbnail generation is one of my sore points ever since the switch was made from the system generated thumbnails to custom thumbnails many years back. I have accidentally triggered thumbnail regeneration a few times to my dismay ... So, If you all could come up with a solution that avoids duplication of the thumbnails, I would be quite relieved. KPA could "learn" to identify the largest thumbnail setting, and store all thumbnails in this size. Browsing thumbnails scaled down seems to work quite ok. Best regards, Andreas Am 05.04.20 um 21:48 schrieb Johannes Zarl-Zierl: > Hi everybody, > > I'm thinking about introducing some breaking changes in KPhotoAlbum > 5.7 (or > maybe 5.8) regarding the file layout. > > As you know, kphotoalbum creates a bunch of files and directories: > DBDIR/index.xml > DBDIR/CategoryImages/ > DBDIR/layout.dat > DBDIR/exif-info.db > DBDIR/.thumbnails/ > DBDIR/.videoThumbnails > XDG_DATA_DIR/kxmlgui5/kphotoalbum/kphotoalbumui.rc > XDG_CONFIG_DIR/kphotoalbumrc > > This directory layout worked ok, but has some shortcomings: > > - it's unclear to the user which files they can safely delete > - potential problems with DBDIR on non-local storage > -> there are occasional problems with people on NFS > -> SQLITE files on CIFS seem to be unsupported > - different performance requirements: > -> the cache files have different access patterns than the images > themselves > - sharing an image directory across different computers can lead to subtle > problems (e.g. different thumbnail size) > > Therefore, I plan on restructuring the file hierarchy like this: > DBDIR/index.xml > DBDIR/CategoryImages > XDG_CACHE_DIR/kphotoalbum/<db>/exif-info.db > XDG_CACHE_DIR/kphotoalbum/<db>/.thumbnails/ > XDG_CACHE_DIR/kphotoalbum/<db>/.videoThumbnails/ > XDG_DATA_DIR/kxmlgui5/kphotoalbum/kphotoalbumui.rc > XDG_DATA_DIR/kphotoalbum/<db>/layout.dat > XDG_CONFIG_DIR/kphotoalbumrc > > The "<db>" part in these paths would be the md5 sum of DBDIR/index.xml > (e.g. > "echo -n /home/johannes/Pictures/index.xml | md5sum"). > > As was previously pointed out, some settings in kphotoalbumrc may also be > better moved directly into the index.xml file (e.g. the "untagged > category" > info). I would propose making these changes at the same time... > > Any thoughts? > > Cheers, > Johannes > > > _______________________________________________ > KPhotoAlbum mailing list > [email protected] > https://mail.kdab.com/mailman/listinfo/kphotoalbum