sagebind / isahc

The practical HTTP client that is fun to use.
https://docs.rs/isahc
MIT License
707 stars 62 forks source link

Preallocate buffer for async json decoding #367

Closed michalmuskala closed 2 years ago

michalmuskala commented 2 years ago

This is already done for bytes, and should speed up async JSON processing considerably, avoiding needles reallocations.

sagebind commented 2 years ago

Thanks!

codecov[bot] commented 2 years ago

Codecov Report

Merging #367 (34657fe) into master (b886d3c) will decrease coverage by 0.03%. The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #367      +/-   ##
==========================================
- Coverage   79.37%   79.34%   -0.04%     
==========================================
  Files          51       51              
  Lines        3060     3060              
==========================================
- Hits         2429     2428       -1     
- Misses        631      632       +1     
Impacted Files Coverage Δ
src/response.rs 68.51% <71.42%> (-1.86%) :arrow_down:

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 b886d3c...34657fe. Read the comment docs.