action #6496
closedImage manager
0%
Description
We waste a lot of disk space by storing basically unoptimized png files. I think it's feasible to deduplicate PNGs that are the same yast screen in different tests - even before we run optipng on them.
The plan would be to store an entry in an image manager queue whenever we save a png and then some background process reads the queue and checks if the md5sum has been seen before and if so replaces the file by a link and if not, runs optipng on it - but remembers the original md5.
And the thumbs need to follow - no need to check their md5. But for them I would prefer a global pool directory accessible for apache, so we link /thumbs/DEADBEEF.png instead of /tests/17272/thumbs/bootloader-1.png (which has to go through the app and has to read the test settings to figure the testresultdir etc) - we display thumbs a lot.
Updated by coolo about 9 years ago
of course you need the usual directory structure to avoid 1M files in one directory. So make the above /thumbs/DE/ADBEEF.png
Updated by coolo about 9 years ago
https://github.com/os-autoinst/openQA/pull/246 is the first part. I decided against a solution using the database, but use the file system to store the md5 as unique ID and next to it a marker file marking files that need to run optipng. On my small laptop installation it works perfectly
What's left is an /images/ route that we can configure to bypass mojo.