At the moment, the code generated by the app is a match statement on the parsed incoming request path.
That could be improved by making additional checks on the number of slashes in a path.
It could be immediately discarded, if the application doesn't have a defined route with that amount.
Routes can also be grouped in different match statements based on that number and thus potentially removing some comparisons that could lead to small performance gains.
Deserialization of path variables is also doing more work than it should.
At the moment, the code generated by the app is a match statement on the parsed incoming request path. That could be improved by making additional checks on the number of slashes in a path. It could be immediately discarded, if the application doesn't have a defined route with that amount. Routes can also be grouped in different match statements based on that number and thus potentially removing some comparisons that could lead to small performance gains.
Deserialization of path variables is also doing more work than it should.