Charge for BTreeSet creation in the ParsedModule/ModueCache
Why
The BTreeSet was the right structure to use, but its cost was not charged for by the budget.
Here we account for the cost of its creation (memory allocation, copy).
Known limitations
Using MeteredMap would be more correct from metering perspective, which accounts for all look-ups and insertions. However, it is too inconvenient to use (every insertion creates a new map), and the extra lookup/insertion costs should be limited to worth the churn.
What
Charge for BTreeSet creation in the
ParsedModule
/ModueCache
Why
The BTreeSet was the right structure to use, but its cost was not charged for by the budget. Here we account for the cost of its creation (memory allocation, copy).
Known limitations
Using
MeteredMap
would be more correct from metering perspective, which accounts for all look-ups and insertions. However, it is too inconvenient to use (every insertion creates a new map), and the extra lookup/insertion costs should be limited to worth the churn.