From 5557fc60621492d967dc62a2805670e402f18bb0 Mon Sep 17 00:00:00 2001 From: Bojan Serafimov Date: Wed, 11 Jan 2023 14:02:55 -0500 Subject: [PATCH] Add todo --- pageserver/src/tenant/layer_map.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pageserver/src/tenant/layer_map.rs b/pageserver/src/tenant/layer_map.rs index 539cba91b0..644c7aeddf 100644 --- a/pageserver/src/tenant/layer_map.rs +++ b/pageserver/src/tenant/layer_map.rs @@ -360,6 +360,10 @@ where /// result for the entire partitioning at once allows this function to be more /// efficient, and further optimization is possible by using iterators instead, /// to allow early return. + /// + /// TODO actually use this method instead of count_deltas. Currently we only use + /// it for benchmarks. It's a drop-in replacement, but it would be good to + /// add early return to this method first so we don't make perf worse. pub fn get_difficulty_map(&self, lsn: Lsn, partitioning: &KeyPartitioning) -> Vec { // TODO This is a naive implementation. Perf improvements to do: // 1. Instead of calling self.image_coverage and self.count_deltas,