Compression of SVG(Z)s in git repositories

Elias Probst mail at eliasprobst.eu
Tue Sep 2 14:50:35 UTC 2014


On 09/02/2014 12:48 PM, Martin Gräßlin wrote:
> On Tuesday 02 September 2014 12:27:11 Sebastian Kügler wrote:
>> On Monday, September 01, 2014 12:59:04 Elias Probst wrote:
>>> I've noticed, that (except of only a very few) nearly all SVG files are
>>> committed as SVGZ to our git repositories.
>>>
>>> This has IMHO several drawbacks:
>>> - every change will be stored as a single atomic blob
>>> - git's internal packfile compression and deduplication can't be used
>>> - no diffs for changes done to SVGs can be viewed
>>> - batch-editing of files via sed/awk/… is way more difficult
>>>
>>> I'd like to suggest to implement a git hook which enforces SVG files
>>> being pushed uncompressed.
>>> The compression of SVG to SVGZ might happen when building release
>>> tarballs.
>>>
>>> What are your thoughts? Any reasons not to do this?
>>
>> Compressed SVG files are way faster to read (it's faster to decompress the
>> data than to read it from disk). Also, the on-disk footprint is lower..
>>
>> Both of these affect the runtime performance of Plasma.
> 
> which is not an argument against storing them as SVG in the repository. There 
> could be a pre-install task in CMake which compresses them.

Exactly. This might make sense to be placed in ECM to avoid duplication
of this functionality all over the place.

> I think Elias suggestion makes sense on the git repository level, we just need 
> to first put in place the CMake bits to ensure the installed files are still 
> svgz.

What I forgot to mention in my initial mail:
This should be only enforced by the git push hook for newly added files,
so a quick change to an existing file doesn't require one to rename it etc.

> 
> Cheers
> Martin
> 
> 
> 
> _______________________________________________
> Kde-frameworks-devel mailing list
> Kde-frameworks-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140902/04a55f1f/attachment.sig>


More information about the Kde-frameworks-devel mailing list