Skip to content

perf: pass storage to tryFallbackAccounts to skip redundant disk read#22

Merged
ualtinok merged 1 commit into
cortexkit:mainfrom
iceteaSA:perf/tryFallbackAccounts-storage
May 20, 2026
Merged

perf: pass storage to tryFallbackAccounts to skip redundant disk read#22
ualtinok merged 1 commit into
cortexkit:mainfrom
iceteaSA:perf/tryFallbackAccounts-storage

Conversation

@iceteaSA
Copy link
Copy Markdown
Contributor

Summary

Adds an optional existingStorage parameter to tryFallbackAccounts(). The fetch handler loads storage at the start of every request but tryFallbackAccounts was reloading it from disk unnecessarily.

Companion to #19 which does the same for getUsableFallbackAccounts.

Testing

All 214 tests pass. No behavior change — only avoids redundant disk I/O.

The fetch handler already loads storage at the start of every request.
tryFallbackAccounts was reloading it from disk unnecessarily. Now
accepts an optional existingStorage parameter to reuse the caller's
copy.
@ualtinok ualtinok merged commit 791d2a1 into cortexkit:main May 20, 2026
2 checks passed
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