-
Improvement
-
Resolution: Done
-
Medium
-
None
ValueRange is a simple construct which works on any java.lang.Number. Examining a heap dump of Junos 19.3 test case reveals we are allocating java.math.BigIntegers to hold ranges – 32428 instances
Each BigInteger costs us 64 bytes of memory, even when we could get away with much smaller storage – Integer/Uint32 and Long/Uint64 end up costing 16/24 bytes, hence we could potentially cut memory usage from ~2.5MiB to 500-800KiB.
Track down the user and try to persuade it to use smaller Number classes.