mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 06:52:23 +03:00
f93426a8c8
Summary: Compressed responses from LFS are slower than they should right now. Normally, we'd expect something along the lines of normal response time + compression time, but right now it's a lot more than this. The reason for this is that our compressed streams are eager, i.e. they will consume and compress as much of the underlying stream as possible before sending off the data. This is problematic for LFS, because we try very hard to serve everything out of RAM directly (and very often succeed), so that means we compress the whole stream before sending it off. This means we might spend e.g. 500ms compressing (this is how long it takes zstd to compress the object I was testing on, which is a ~80MiB binary that compresses down to 33% of that), and _then_ we'll spend some time transferring the compressed data, when we could have started transferring immediately while we were compressing. To achieve this, let's simply tell our compressed stream to stop waiting for more data once in a while (every 4 MiB, which seems very frequent but actually really isn't). Reviewed By: StanislavGlebik Differential Revision: D23782756 fbshipit-source-id: a0d523d84f92e215eb366f551063383fc835fdd6 |
||
---|---|---|
.. | ||
fs | ||
integration | ||
locale | ||
mononoke | ||
scm | ||
scripts | ||
test_support | ||
test-data | ||
.clang-format | ||
.gitignore | ||
Eden.project.toml |