-
Improvement
-
Resolution: Done
-
Medium
-
None
-
None
After addressing YANGTOOLS-1067 we are pretty much in a place where we have squeezed pretty much all generic memory efficiency.
Examining the heap dump from a Junus 19.3 model run, we still have a rather large number of duplicate objects, but these seem to be coming from duplication inherently present in the model sources.
There is a single outlier, which is PatternExpression – these are immutable String holders, for which which one of the strings comes from models, and thus is already deduplicated by our IR parsing pass. The second String is the adjusted Pattern string, which we derive.
Improve the situation by interning PatterExpressions, reducing memory footprint in this particular use case by about 2%.