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

Optimise unpack routine #12

Open
ermo opened this issue Feb 17, 2023 · 0 comments
Open

Optimise unpack routine #12

ermo opened this issue Feb 17, 2023 · 0 comments

Comments

@ermo
Copy link
Member

ermo commented Feb 17, 2023

Ikey Doherty
i still suspect we want a better unpack routine
that would potentially speed up unpackContent
by using predetermined zstd buffer sizes
and avoid any GC
basically read from mmap, decompress into statically allocated buffer, dump direct to file
rather than the data-payload supporting usecase we have right now which is very chunk oriented
and readahead-esque
at least it works
we can optimise that at a later date imo
(low hanging fruit for anyone to take though)
like make ReaderToken have an API to unpack() directly and make reader/package.d use that
ermo
Given what you just went through, I think calling it "low hanging fruit" might ... not be what it is?
Ikey Doherty
ive done the heavy lifting
its basically gonna be more like a copy of readChunk where it loops on the input file
(well, input blocks)
and directly dumps without allocating to cachedStorage
keep optimimal block sizes and avoid allocations
win-win
(given that the overhead of zstd is something like 131mb per thread now)

@ermo ermo changed the title Optimised readers and writers Optimise readers and writers Feb 17, 2023
@ermo ermo changed the title Optimise readers and writers Optimise unpack routine Feb 17, 2023
@ikeycode ikeycode transferred this issue from another repository Mar 21, 2023
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

No branches or pull requests

2 participants