Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid regexes when routing in restJson1 and rpcv2Cbor #3748

Open
david-perez opened this issue Jul 9, 2024 · 0 comments
Open

Avoid regexes when routing in restJson1 and rpcv2Cbor #3748

david-perez opened this issue Jul 9, 2024 · 0 comments
Labels
server Rust server SDK

Comments

@david-perez
Copy link
Contributor

Our router implementations for the restJson1 (see request_spec.rs) and rpcv2Cbor protocols rely on regexes.

We should consider code-generating a nom parser instead, which should be more performant. We already use nom parsers in restJson1 to extract @httpLabels from the URI (see #938), and some simple benchmarking found it to be ~200x faster ~200x faster.

It'd be interesting to tackle this after we have proper benchmarks (#214) to determine any performance impact.

@david-perez david-perez added the server Rust server SDK label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Rust server SDK
Projects
None yet
Development

No branches or pull requests

1 participant