T
TanStack2y ago
correct-apricot

Performance issue with Vite plugin on windows

Hey Tanstack Router Community, I am facing a weird perf issue with the vite plugin. I have a small app with aroud 6 routes implemented using file based routing and the plugin generates the routes for me in around 300 - 500ms(I am on mac). But for my other team members using windows it is takes upwards of 10seconds. Any idea why that might be happening? Also wanted to understand what is the recommended practice for the routeTree.gen.ts file, should it be committed to remote or not since it will anyway be generated during the build process.
2 Replies
sensitive-blue
sensitive-blue2y ago
Regarding the whether or not the routeTree.gen.ts file should be commited in, it changes based on how your build process and CI works. You could choose not to commit the file, and generate prior to running build using the tsr binary, or you could just leave it in. About the perf stuff on windows, I'd have to ask @Tanner Linsley 's thoughts on that. Nothing I can see about the vite-plugin that should inherently be causing it to that slow in generating the routeTree, and its not something I can test on my Mac either.
flat-fuchsia
flat-fuchsia2y ago
Six routes shouldn’t even take 300 ms, let alone 10 seconds on the windows. I’m not sure how to approach this issue but I would love to be able to improve this speed on both accounts.

Did you find this page helpful?