Skip to content

Only instantiate coders once#50

Merged
jeffcarbs merged 3 commits into
mainfrom
coders-3
May 5, 2026
Merged

Only instantiate coders once#50
jeffcarbs merged 3 commits into
mainfrom
coders-3

Conversation

@jeffcarbs

@jeffcarbs jeffcarbs commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Avoids creating new coder instances on every save and load call by memoizing them on the runner
  • FileCache#read and FileCache#write also reuse the same instances via a private coder_for helper rather than calling .new inline
  • Some opportunistic renames:
    • Cache#data -> Cache#content
    • Coder#save -> Coder#generate
    • Coder#load -> Coder#mount

Test plan

  • Existing cache and file cache specs continue to pass

🤖 Generated with Claude Code

Base automatically changed from coders-2 to main May 5, 2026 15:47
@jeffcarbs jeffcarbs marked this pull request as ready for review May 5, 2026 15:48
@jeffcarbs jeffcarbs requested a review from ngan May 5, 2026 15:50
@jeffcarbs jeffcarbs merged commit d4e8e26 into main May 5, 2026
5 checks passed
@jeffcarbs jeffcarbs deleted the coders-3 branch May 5, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants