question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RFE: store resource files compressed

See original GitHub issue

I’ve noticed that data directory is 39Mb. I think it can be compressed with e.g. zstd and decompressed on the fly, without large performance penalties, but with 7x size reduction (up to 5.3Mb):

$ cat lib/python3.7/site-packages/botocore/data/ec2/2016-11-15/service-2.json | pv >/dev/null
1.52MiB 0:00:00 [1.19GiB/s] [  <=>                                                                                                             ]

$ cat lib/python3.7/site-packages/botocore/data/ec2/2016-11-15/service-2.json | zstd -9 - > /tmp/compressed-services.json.zstd

$ ls -lh /tmp/compressed-services.json.zstd 
-rw-r--r-- 1 danbst users 148K гру 28 03:01 /tmp/compressed-services.json.zstd

$ cat /tmp/compressed-services.json.zstd | zstd -d - | pv > /dev/null
1.52MiB 0:00:00 [ 474MiB/s] [  <=>                                                                                                             ]

Perhaps this should only be done for python package, but source should be left in JSON.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dacutcommented, Dec 29, 2019

In case you’re curious: pickling (instead of JSON) reduces the file load time for zstd from 21 msec to 13 msec on my laptop.

0reactions
no-response[bot]commented, Jan 20, 2020

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don’t have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[RFE] different vfs storage strategy · Issue #2999 - GitHub
I have a particular image that takes 218GB for a 5.5GB rootfs. I would gladly trade a longer startup time for the ability...
Read more >
850896 – [rfe] [metadata] smarter metadata format for quicker ...
Current yum repository format that stores some kind of information about all the packages in a single repo in a single file has...
Read more >
Developer Tools > Project > Resources. Torry's Delphi Pages
Resource editor for programs. It can import resources from executable files and RES files. It can generate resource files and source files in...
Read more >
New RFE: dp:deflate()/inflate() for GatewayScript - Forums - IBM
Now base64 encode the data to be able to store safely, else it is outputted as Binary string let compressedB64 = new Buffer(compressed,...
Read more >
Scanning and Uploading Tips - travel.gov
If your scanned image is too large, compress it before uploading it. “Zipped” files or password-protected files will not be accepted.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found