I came across this PR from Deno's fresh framework that might be beneficial to Rutt.
The PR is a fix to speed up the slow matching of static routes where previously, each static file route had its own URLPattern instance. This approach was slow and did not allow for an exact match.
What the PR proposes is to extend the route pattern to either be URLPattern or string. If the route pattern is a string, they treat it as an exact match, the URL is parsed, and a regex match is avoided. This is only applicable for internally created patterns; user-supplied patterns will still be parsed into URLPattern like before.
The author has reported significant improvements with this fix, reducing route-matching time from 62ms down to 0.7ms in real-world testing.
I think it could be an interesting enhancement for the routing in Rutt as well. It may be worth considering whether similar improvements can be implemented.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too