Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
We can improve the performance of baseNodeCollection.getNodeIteratorInternal(). This gets called in every scheduling cycle. In a cluster with thousands of nodes, this has costs. In one of my heap profiles which I collected during some performance testing, this method shows up in the alloc_space heap profile. Not the biggest contributor (around 5%), but it is visible. Therefore, optimizing it has measurable benefits.
Approaches:
- caching: only sort nodes if necessary. Unfortunately, every allocation results in new scores, so we probably constantly have to invalidate the cached list.
- walking the BTree: the current implementation does not have a stateful iterator, but we can still call BTree.Ascend() with a function parameter, which returns false as soon as we find a suitable node.