Support for compression levels

6 views
Skip to first unread message

Hans Werner

unread,
Mar 6, 2020, 5:51:54 AM3/6/20
to dulwich-discuss
Hi,

adding Blobs to DiskObjectStore 'as_legacy_object' is done with default compression level.
For my application speed is more important than size, so it would be great if
it would be possible to set the compression level to 0.
Blobs are Images with about 4MB size. (No need for LFS here)

If there is another way to reach speed improvement, please tell me how.


Hans

Jelmer Vernooij

unread,
Apr 1, 2020, 6:18:03 PM4/1/20
to dulwich-discuss
Hi Hans,

Sorry for the slow response.
I think you're asking for support for the core.compression, core.packCompression and core.looseCompression settings in Dulwich. I think that would be great to add.

A pull request to add support for these configuration would be great; I think you would want to:

* Add arguments to ObjectStore() for loose_compression_level and pack_compression_level
* Add support for compression_level in as_legacy_object()
* Pass the appropriate compression_level arguments to as_legacy_object in ObjectStore
* Update Repo to retrieve the three configuration variables and pass loose_compress_level and pack_compression_level to ObjectStore, defaulting to core.compression. 

Otherwise, if you create an issue on GitHub I can probably add it some point this month.

Cheers,

Jelmer

Jelmer Vernooij

unread,
Apr 2, 2020, 9:50:53 PM4/2/20
to dulwich-discuss

Actually, I felt like implementing something quick and easy tonight so this has now been added in master. Dulwich will now honor the following settings:

* core.compression
* core.looseCompression
* core.packCompression

Jelmer

Hans Werner

unread,
Apr 7, 2020, 8:22:28 AM4/7/20
to dulwich-discuss
Hi Jelmer,

thanks for your fast improvements.
I've tested the new settings today and it's exactly what I was looking for.


Regards,

Hans

Reply all
Reply to author
Forward
0 new messages