Benjamin Trent a370104535
[ML] change to only calculate model size on initial load to prevent slow cache promotions (#66451) (#66462)
When a value is promoted in the LRU cache, its weight is removed and added.

The LocalModel object was recalculating the model size for ever weight check, which caused a polynomial runtime.

This commit changes the model size to only be calculated in the LocalModel ctor.
2020-12-16 14:01:21 -05:00
..