-
-
Notifications
You must be signed in to change notification settings - Fork 18
Redesign #18
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
Comments
|
I'm not sure what these examples map to, but one thing that would be nice to have is the ability to match before/after params: |
@adriangb https://cloud.google.com/apis/design/custom_methods Google API Design. |
Ah yes never got into that stuff, but I've heard of it/seen it going around before. I thought this was an interesting idea for benchmarking / minimum necessary features: https://github.com/richardolsson/falcon-routing-survey. Looking at the APIs for major companies makes sense, it's a realistic representation of what is needed routing-wise for a large well designed API. |
hi @Txuritan, I have refactored and the routing syntax has been enhanced and the performance has been greatly improved. If you have time, please review the code and see if there are any optimization points. Thanks |
Landed in v0.5.0. Next supports regex. |
I took a look using my normal profiling tools and I don't see any issues other than this I didn't see any issues in any of the One optimization I do plan on trying is to use slab allocation to keep all nodes in the same memory space though I'm not sure if this will help in the end. I may also try to remove the required lifetime and play around this |
For what it's worth adding the lifetimes makes it really hard to wrap this with PyO3 because there's nothing to own the |
That was my thought as well, I'm hoping I can remove it without causing a major slowdown anywhere. |
It looks like removing the lifetime will cause an increase but it is still faster than it was before, though not by much. As a comparison I went and ran the benchmark with
Note: Same as before, the benchmark was ran with mimalloc with the security features disabled. |
That seems like a super minor (if even statistically significant) regression. It would allow me to continue wrapping it with Python, I don’t think that’s possible with the lifetimes in there. |
Uh oh!
There was an error while loading. Please reload this page.
Named parameters
Named parameters are defined by prefixing a colon to the parameter name (:name), pattern is
([^\/#\?]+)
./heros/:name
/heros/io
name=io
/heros/morphling
name=morphling
/heros/123
name=123
/heros/io/123
/heros/
The text was updated successfully, but these errors were encountered: