Skip to content

perf(cache): consolidate HotSnapshot atomic refcounts into single Arc<FrozenState> (#149) - #179

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
perf-consolidate-snapshot-149
Aug 27, 2026
Merged

perf(cache): consolidate HotSnapshot atomic refcounts into single Arc<FrozenState> (#149)#179
ZhuchkaTriplesix merged 2 commits into
devfrom
perf-consolidate-snapshot-149

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Consolidates all immutable request-path state fields into a single FrozenState struct, held as snapshot: Arc<FrozenState> on AppState.
  • Replaces 8 individual Arc::clone / Py::clone atomic refcount bumps per request in AppState::hot_snapshot() with a single Arc::clone(&self.snapshot).
  • Updates AppState::rebuild_snapshot() on all route/middleware/CORS/DB mutations.
  • Eliminates redundant per-request cloning of cors, security_headers, and middleware in src/dispatch.rs.

Closes #149

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 7af51f7 into dev Aug 27, 2026
16 of 17 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.

1 participant