Skip to content

Always cache resolvers#303

Merged
masklinn merged 1 commit intoua-parser:masterfrom
masklinn:caching
Apr 4, 2026
Merged

Always cache resolvers#303
masklinn merged 1 commit intoua-parser:masterfrom
masklinn:caching

Conversation

@masklinn
Copy link
Copy Markdown
Contributor

@masklinn masklinn commented Apr 4, 2026

After getting access to a second dataset which is a lot more cache-friendly than the original (while also being a real-world sample), I think it makes sense to cache the "fast" resolvers as well: going back to the original
commit (b45380d) an S3Fifo(5000) was estimated to take about 3.5MB when full (0.5MB of cache metadata, and 3MB of actual cached data), so an S3Fifo(2000) would be about 1.5MB or thereabouts which is not nothing... but is pretty much nothing compared to the RSS impact of the advanced parsers.

Fixes #302

After getting access to a second dataset which is a lot more
cache-friendly than the original (while also being a real-world
sample), I think it makes sense to cache the "fast" resolvers as well:
going back to the original
commit (b45380d) an S3Fifo(5000) was
estimated to take about 3.5MB when full (0.5MB of cache metadata, and
3MB of actual cached data), so an S3Fifo(2000) would be about 1.5MB or
thereabouts which is not nothing... but is pretty much nothing
compared to the RSS impact of the advanced parsers.

Fixes ua-parser#302
@masklinn masklinn enabled auto-merge (rebase) April 4, 2026 11:16
@masklinn masklinn merged commit c85e4e3 into ua-parser:master Apr 4, 2026
36 checks passed
@masklinn masklinn deleted the caching branch April 4, 2026 11:22
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.

Cache the re2 and regex resolvers

1 participant