Skip to content

perf: use a shared resty.Client object for all requests#644

Merged
tobiasehlert merged 2 commits intomainfrom
dev/kamilon/sharedhttpclient
Apr 22, 2026
Merged

perf: use a shared resty.Client object for all requests#644
tobiasehlert merged 2 commits intomainfrom
dev/kamilon/sharedhttpclient

Conversation

@kamilon
Copy link
Copy Markdown
Contributor

@kamilon kamilon commented Apr 22, 2026

This should actually make a noticeable difference in resource usage at TibiaData scale. Back of the napkin math is somewhere around 10MB less GC churn and 10-15% reduced CPU. It should also lower average response time from Tibia.com due to reduced TLS handshakes with the service.

I validated this via build, test and race detector. I also double checked that resty.Client is thread-safe.

@kamilon kamilon requested a review from tobiasehlert April 22, 2026 16:33
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 80.76923% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.43%. Comparing base (5203d64) to head (3f7a295).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #644      +/-   ##
==========================================
+ Coverage   78.42%   78.43%   +0.01%     
==========================================
  Files          22       22              
  Lines        3690     3692       +2     
==========================================
+ Hits         2894     2896       +2     
  Misses        658      658              
  Partials      138      138              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@tobiasehlert tobiasehlert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tobiasehlert tobiasehlert merged commit 2942cc4 into main Apr 22, 2026
9 of 10 checks passed
@tobiasehlert tobiasehlert deleted the dev/kamilon/sharedhttpclient branch April 22, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants