From 6b45fab652a7ba1f455107f3f2971b773d0f6e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Mon, 21 Aug 2023 19:37:28 +0200 Subject: [PATCH] Add some perf improvment idea comments --- car-mirror/src/dag_walk.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/car-mirror/src/dag_walk.rs b/car-mirror/src/dag_walk.rs index 707c617..2f9b3f0 100644 --- a/car-mirror/src/dag_walk.rs +++ b/car-mirror/src/dag_walk.rs @@ -72,6 +72,9 @@ impl DagWalk { } }; + // TODO: Two opportunities for performance improvement: + // - skip Raw CIDs. They can't have further links (but needs adjustment to this function's return type) + // - run multiple `get_block` calls concurrently let block = store.get_block(&cid).await?; for ref_cid in references(cid, &block)? { if !self.visited.contains(&ref_cid) {