Skip to content

Commit

Permalink
Add some perf improvment idea comments
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed Aug 21, 2023
1 parent e3358fd commit 6b45fab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions car-mirror/src/dag_walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6b45fab

Please sign in to comment.