Closed pmetras closed 6 years ago
We could only recreate them when we detect a change.
I considered that possibility, and dropped it because:
And search index files for album metadata are considered stale and deleted. At the first run, one can search for keywords on album's metadata. On the second run, the same search fails.
Yes, now album.read_album_ini()
is executed only if the json file is invalid. Perhaps it could be executed every time, couldn't it?
https://github.com/paolobenve/myphotoshare/commit/a01d0db8907ab27d1ccae9c38e6f38ac199b486f wasn't complete, now is ok
What should be the strategy to use in the Debian package installer regarding cache content? Currently, I delete all files from cache
directory. When the user installs a new version of the Debian package, next run of scanner will start anew with a full generation. Can we optimize that?
Should I keep the content of cache
sub-directories (generated pictures) and delete only some .json
files?
There is no need to delete the cache, the scanner detects the condition when that is needed
Another strange behaviour with master branch, probably a case for better optimization.
.json
index files are created..json
files are generated while there were no changes between the two runs. Better, some stale files are suppressed when there's analbum.ini
file!So image files are generated only when changed. But index files are always generated. We could only recreate them when we detect a change.
And search index files for album metadata are considered stale and deleted. At the first run, one can search for keywords on album's metadata. On the second run, the same search fails.