Skip to content

Cache Memory Usage #776

Answered by nielsbasjes
amcheng asked this question in Q&A
Oct 20, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I haven't tested this and this sounds about right.

The cache holds a complete parsed UserAgent which is all keys and values of both the input and output + overhead for the classes and indexing.

I took two of the testcases from the yaml to do a quick estimate just based on the textual content that must be stored:

  • Basic simple Chrome on Android: ~ 800 bytes
  • Full example with all client hints: ~1800 bytes.

Add overhead of the Java classes to that and I expect the caching to need something in the 1-2KiB per record range.
So your 1.7KiB sounds right to me.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@amcheng
Comment options

Answer selected by amcheng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants