Skip to content

perf(params): zero-allocation path parameter extraction from URL slices (#140) - #176

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
perf-zero-alloc-params-140
Aug 27, 2026
Merged

perf(params): zero-allocation path parameter extraction from URL slices (#140)#176
ZhuchkaTriplesix merged 2 commits into
devfrom
perf-zero-alloc-params-140

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #140

  • Updated match_route_compiled and match_ws_route_compiled in src/state.rs to return borrowed matchit::Params<'a, 'b> slices directly instead of allocating intermediate heap Vec<(String, String)> and owned Strings.
  • Updated run_rsgi in src/dispatch.rs to iterate over params.iter() directly when populating kwargs into the Python PyDict.
  • Updated value_for_path_param in src/params.rs to create PyString directly from &str slices without allocating intermediate Rust Strings.

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit b804b38 into dev Aug 27, 2026
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