Two attempts at a faster report
builds on: Branches as parallel lines of work, Commit before every task: checkpoints
$ git switch -c try-cache
▸ You: Speed up `build_report` in `src/report.py` by caching its results between runs.
Review, run the report, commit.
Then, from `main` again:
$ git switch main
$ git switch -c try-batch
▸ You: Speed up `build_report` in `src/report.py` by reading the input file once, not many times.
Review, run, commit.
Run each version twice. Outputs match `main`, but a cache only helps repeat runs, so `try-cache` stays slow the first time. `--stat` counts changed lines per file: `try-batch` is smaller too. Keep it.
$ git diff --stat main try-cache
src/cache.py | 58 ++++++++++++++++
src/report.py | 39 +++++++++---
2 files changed, 88 insertions(+), 9 deletions(-)
$ git diff --stat main try-batch
src/report.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)