openrewrite / openrewrite/rewrite-analysis
Global Data Flow: Optimize `FlowGraph` Creation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 16
- Forks
- 12
- Avg merge
- 2h 26m
- Merged PRs (30d)
- 1
Description
Currently, we are redundantly creating multiple FlowGraph for paths that we've already previously computed. We could optimize this by having a cache of DataFlowNode to FlowGraph, such that when we attempt to create a FlowGraph for an existing DataFlowNode, we return the existing FlowGraph.
This could likely further be optimized if, while performing the data flow computation, we received a cached FlowGraph could stop the computation preemptively.
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.
Research direction
Start by locating where FlowGraph instances are created from DataFlowNode objects and where data flow computation proceeds. Trace the existing computation and tests, if present, then verify that repeated nodes reuse a graph and that computation can stop when a cached graph is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100