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

fpdf: introduce buffer pool for (de)flating buffers #8

Merged
merged 1 commit into from
Jun 23, 2021
Merged

Conversation

sbinet
Copy link
Contributor

@sbinet sbinet commented Jun 23, 2021

name              old time/op    new time/op    delta
ParsePNG_rgb-8      22.8ms ± 1%    16.0ms ± 3%  -29.81%  (p=0.000 n=25+30)
ParsePNG_gray-8      660µs ± 3%     624µs ± 4%   -5.54%  (p=0.000 n=28+30)
ParsePNG_small-8    2.49µs ± 2%    2.12µs ± 3%  -14.83%  (p=0.000 n=30+30)
ParseJPG-8          36.3µs ± 4%    36.8µs ± 5%     ~     (p=0.070 n=30+30)
ParseGIF-8           410µs ± 3%     409µs ± 4%     ~     (p=0.562 n=30+29)

name              old alloc/op   new alloc/op   delta
ParsePNG_rgb-8      26.4MB ± 0%     4.2MB ±10%  -84.04%  (p=0.000 n=29+30)
ParsePNG_gray-8     2.56MB ± 0%    2.49MB ± 0%   -2.73%  (p=0.000 n=30+30)
ParsePNG_small-8    8.96kB ± 0%    9.84kB ± 0%   +9.73%  (p=0.000 n=30+30)
ParseJPG-8           274kB ± 0%     274kB ± 0%   -0.00%  (p=0.002 n=30+30)
ParseGIF-8           897kB ± 0%     898kB ± 0%   +0.10%  (p=0.000 n=30+30)

name              old allocs/op  new allocs/op  delta
ParsePNG_rgb-8         400 ± 0%       292 ± 0%  -27.00%  (p=0.000 n=30+28)
ParsePNG_gray-8        164 ± 0%       114 ± 0%  -30.49%  (p=0.000 n=30+30)
ParsePNG_small-8      35.0 ± 0%      10.0 ± 0%  -71.43%  (p=0.000 n=30+30)
ParseJPG-8            12.0 ± 0%      12.0 ± 0%     ~     (all equal)
ParseGIF-8             214 ± 0%       191 ± 0%  -10.75%  (p=0.000 n=30+30)

```
  name              old time/op    new time/op    delta
  ParsePNG_rgb-8      22.8ms ± 1%    16.0ms ± 3%  -29.81%  (p=0.000 n=25+30)
  ParsePNG_gray-8      660µs ± 3%     624µs ± 4%   -5.54%  (p=0.000 n=28+30)
  ParsePNG_small-8    2.49µs ± 2%    2.12µs ± 3%  -14.83%  (p=0.000 n=30+30)
  ParseJPG-8          36.3µs ± 4%    36.8µs ± 5%     ~     (p=0.070 n=30+30)
  ParseGIF-8           410µs ± 3%     409µs ± 4%     ~     (p=0.562 n=30+29)

  name              old alloc/op   new alloc/op   delta
  ParsePNG_rgb-8      26.4MB ± 0%     4.2MB ±10%  -84.04%  (p=0.000 n=29+30)
  ParsePNG_gray-8     2.56MB ± 0%    2.49MB ± 0%   -2.73%  (p=0.000 n=30+30)
  ParsePNG_small-8    8.96kB ± 0%    9.84kB ± 0%   +9.73%  (p=0.000 n=30+30)
  ParseJPG-8           274kB ± 0%     274kB ± 0%   -0.00%  (p=0.002 n=30+30)
  ParseGIF-8           897kB ± 0%     898kB ± 0%   +0.10%  (p=0.000 n=30+30)

  name              old allocs/op  new allocs/op  delta
  ParsePNG_rgb-8         400 ± 0%       292 ± 0%  -27.00%  (p=0.000 n=30+28)
  ParsePNG_gray-8        164 ± 0%       114 ± 0%  -30.49%  (p=0.000 n=30+30)
  ParsePNG_small-8      35.0 ± 0%      10.0 ± 0%  -71.43%  (p=0.000 n=30+30)
  ParseJPG-8            12.0 ± 0%      12.0 ± 0%     ~     (all equal)
  ParseGIF-8             214 ± 0%       191 ± 0%  -10.75%  (p=0.000 n=30+30)
```
@codecov-commenter
Copy link

Codecov Report

Merging #8 (fc0b6fc) into main (0532bfd) will decrease coverage by 0.00%.
The diff coverage is 77.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
- Coverage   79.26%   79.25%   -0.01%     
==========================================
  Files          29       32       +3     
  Lines        5459     5524      +65     
==========================================
+ Hits         4327     4378      +51     
- Misses        817      827      +10     
- Partials      315      319       +4     
Impacted Files Coverage Δ
util.go 72.82% <ø> (+0.18%) ⬆️
template.go 79.31% <20.00%> (-1.94%) ⬇️
fpdf.go 82.08% <60.00%> (ø)
xcompr.go 67.64% <67.64%> (ø)
rbuf.go 73.33% <73.33%> (ø)
png.go 78.66% <91.80%> (+3.28%) ⬆️
attachments.go 92.72% <100.00%> (+0.27%) ⬆️
wbuf.go 100.00% <100.00%> (ø)
... and 1 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 0532bfd...fc0b6fc. Read the comment docs.

@sbinet sbinet merged commit fc0b6fc into main Jun 23, 2021
@sbinet sbinet deleted the perf-compress branch June 23, 2021 13:20
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