Replies: 2 comments 2 replies
-
That's weird. I tried to set up an empty project and tested a route with and without the trailing slash and there some minor overhead but a router redirect shouldn't take several hundred ms since it never hits any of the controllers or middleware. Could it be that the app establishes a database connection before a route action is executed? |
Beta Was this translation helpful? Give feedback.
2 replies
-
The funny thing is that it is only on this route, the other routes are normal, this route does m2m queries in the database, all the keys have index, I don't know what is going on. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think there is something wrong with the routes?
I have a route that makes 2 queries in the database and returns this data, but it is taking 360ms, the latency from my house to my server is 180ms, so I put a cache in this route and it is still taking 360ms, so I put a slash (/) at the end and realized that the framework made a 301 redirect to the route without the slash, and the return this time took 700ms, double the 360ms, the other routes are normal.
I thought it was the database queries, but the logs show that they are fast.
Even with caching enabled or without caching, the return time is the same.
So, Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions