Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fflate to decompress package list chunks #1456

Open
wants to merge 1 commit into
base: chunky-pt2
Choose a base branch
from

Conversation

anttimaki
Copy link
Collaborator

While r2modman used Node's zlib as intended, TSMM used a library that happened to be present as a 2nd degree dependency. While it worked, the library had poor performance, taking ~3s to decompress each chunk, while zlib and fflate takes next to no time at all.

Using DecompressionStream instead was considered, but based on a single google result it seems that would require updating the TypeScript version, which is a side quest for another time.

It was also considered sniffing the app version and using fflate only on TSMM, so it wouldn't need to be added as a dependency on r2modman. In the end gut feeling decided that would be unnecessarily complex and prone to break due to future changes.

While r2modman used Node's zlib as intended, TSMM used a library that
happened to be present as a 2nd degree dependency. While it worked, the
library had poor performance, taking ~3s to decompress each chunk,
while zlib and fflate takes next to no time at all.

Using DecompressionStream instead was considered, but based on a single
google result it seems that would require updating the TypeScript
version, which is a side quest for another time.

It was also considered sniffing the app version and using fflate only
on TSMM, so it wouldn't need to be added as a dependency on r2modman.
In the end gut feeling decided that would be unnecessarily complex and
prone to break due to future changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants