Skip to content

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

Closed
kamilon wants to merge 2 commits intotibiadata:mainfrom
kamilon:dev/kamilon/sharedhttpclient
Closed

perf: use a shared resty.Client object for all requests#628
kamilon wants to merge 2 commits intotibiadata:mainfrom
kamilon: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 04:59
@sonarqubecloud
Copy link
Copy Markdown

@kamilon kamilon closed this Apr 22, 2026
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.

1 participant