Sharing AnalyzerConfig between instances of AbstractUserAgentAnalyzer #1223
Replies: 1 comment 5 replies
-
My first question to you is why this ~20MiB of memory usage is an issue to you? The runtime is a few hundred MiB per instance (not sharable) and to me this 20MiB seems like a very small part of this. Also you should not have more than a handful of instances per JVM and having 5 instances would mean ~100MiB too much which in the systems where I run it is a tiny value. Also I have done benchmarks and most of the time is not spent in loading these files. Most of the time is spent in creating the (not sharable) data structures. You can try to speed things up by using Kryo and serialize the instance and then deserialize it as an identical clone. This should give you a speedup. |
Beta Was this translation helpful? Give feedback.
-
Creating a new instance of a
UserAgentAnalyzer
creates a new instance of anAnalyzerConfig
. The creation of a newAnalyzerConfig
reads a large number of YAML files and takes up approximately 20MG of the stack. This slows down the creation of aUserAgentAnalyzer
and increases the memory used if you have more than one instance of aUserAgentAnalyzer
. As far as I can tell, theAnalyserConfig
is static and does not change.Beta Was this translation helpful? Give feedback.
All reactions