fiber icon indicating copy to clipboard operation
fiber copied to clipboard

⚡ perf: Improve usage of sync.Pool

Open gaby opened this issue 3 months ago • 4 comments

Summary

  • Add support for using sync.Pool across code base
  • Validate release of objects put in the pools

gaby avatar Sep 28 '25 13:09 gaby

[!IMPORTANT]

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

[!NOTE]

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch review-and-optimize-sync.pool-usage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Sep 28 '25 13:09 coderabbitai[bot]

/gemini review

gaby avatar Sep 28 '25 13:09 gaby

Codecov Report

:x: Patch coverage is 72.54237% with 405 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 89.43%. Comparing base (b25339d) to head (98f436a). :warning: Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
helpers.go 69.84% 50 Missing and 26 partials :warning:
middleware/logger/tags.go 57.31% 25 Missing and 10 partials :warning:
binder/binder.go 46.15% 18 Missing and 10 partials :warning:
redirect.go 67.53% 15 Missing and 10 partials :warning:
res.go 72.82% 14 Missing and 11 partials :warning:
client/cookiejar.go 77.01% 13 Missing and 7 partials :warning:
client/request.go 80.95% 11 Missing and 9 partials :warning:
state.go 65.21% 9 Missing and 7 partials :warning:
req.go 85.71% 9 Missing and 6 partials :warning:
middleware/idempotency/response.go 67.44% 9 Missing and 5 partials :warning:
... and 17 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3767      +/-   ##
==========================================
- Coverage   91.70%   89.43%   -2.27%     
==========================================
  Files         113      114       +1     
  Lines       11940    13177    +1237     
==========================================
+ Hits        10949    11785     +836     
- Misses        728      976     +248     
- Partials      263      416     +153     
Flag Coverage Δ
unittests 89.43% <72.54%> (-2.27%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Sep 28 '25 14:09 codecov[bot]

/gemini review

gaby avatar Oct 05 '25 13:10 gaby