Avoid repeated Element dependency graph traversal
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- build-system, performance
Research direction
Start with Element.__update_cache_keys() and Element._dependencies(), then compare the local materialization approach in PR #2172 with Python's functools.cache documentation. Verify that the dependency graph is traversed only once while both weak and strict cache keys are calculated, without changing the resulting keys.
Written by the indexing model from the issue text.
Description
Element.__update_cache_keys() may traverse the same BUILD dependency graph multiple times while calculating weak and strict cache keys.
PR #2172 reduces this locally by materializing the dependency list once and reusing it for both calculations, but Element._dependencies() could be cached with something like @functools.cache.
- Dominant language
- Python
- Stars
- 144
- Forks
- 45
- Avg merge
- 20h 38m
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/buildstream
-
logging
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/buildstream#2150 · 3 comments ·
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
apache/buildstream#2143 · 2 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/buildstream#2194 ·
-
Modification time of an element with an open workspace propagates into consumer element's sandbox Openbug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
apache/buildstream#2186 · 2 comments · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/buildstream#2184 · 1 comment ·
All issues in apache/buildstream
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100