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
Router route matcher caching #26119
Labels
Comments
this is absolutely a valid issue. we're tracking it in Nuxt in #25612, but it's really an issue to be resolved in vue-router. You can see and participate in the ongoing discussion here: vuejs/router#2132. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature
I would like to know if there is a specific reason why on server side the vue router is created on every request, especially when having a huge amount of routes.
Use case is that we have a bug amount of rules, which causes a slight delay (around 200-500ms) on the server side. Looking at the performance output it clearly shows that this delay is caused by the addRoute method in the vue-router package.
I'm not sure if this can be purley implemented in nuxt, I would assume yes - I have not the whole view if the vue router object can be shared in the nuxt server instance. Most probably not. This would mean that the vue-router needs some adoptions to support some caching in between. Especially the matcherMap.
If the answer is this can not be done on nuxt side then I will create a ticket in vue-router base.
I will also try to come up with some ideas on how to cache this. As said I'm not 100% sure where the right place is. I can point to the part in the code, but I think from the above descriptions it should be easy to find it.
Additional information
Final checks
The text was updated successfully, but these errors were encountered: