Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

[#163] Fix zip streaming #164

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

KirillovDenis
Copy link
Contributor

@KirillovDenis KirillovDenis commented Jun 17, 2022

Declined to use (*zip.Writer).CreateRaw() as it does not result in a noticeable performance increase, but introduces unnecessary complexity.

Increased buffer to download zip archive up to 3MB (the same as for upload files).
Started using (*fasthttp.RequestCtx).SetBodyStreamWriter() to get rid of of accumulation of response body in application memory.

close #163
Signed-off-by: Denis Kirillov [email protected]

@codecov
Copy link

codecov bot commented Jun 17, 2022

Codecov Report

Merging #164 (d28d8b8) into master (67ea967) will increase coverage by 13.08%.
The diff coverage is 26.00%.

@@             Coverage Diff             @@
##           master     #164       +/-   ##
===========================================
+ Coverage   14.22%   27.31%   +13.08%     
===========================================
  Files           3       11        +8     
  Lines         253      875      +622     
===========================================
+ Hits           36      239      +203     
- Misses        213      604      +391     
- Partials        4       32       +28     
Impacted Files Coverage Δ
downloader/head.go 0.00% <0.00%> (ø)
metrics.go 0.00% <0.00%> (ø)
pprof.go 0.00% <0.00%> (ø)
uploader/multipart.go 0.00% <ø> (ø)
uploader/upload.go 0.00% <0.00%> (ø)
downloader/download.go 7.22% <10.10%> (+2.43%) ⬆️
main.go 34.37% <45.45%> (ø)
app.go 56.80% <58.06%> (ø)
settings.go 52.11% <85.71%> (ø)
uploader/filter.go 85.71% <94.87%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a0af13...d28d8b8. Read the comment docs.

@alexvanin alexvanin merged commit 85ee0c4 into nspcc-dev:master Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Try optimize ZIP download
2 participants