-
Notifications
You must be signed in to change notification settings - Fork 519
slow using dotnet watch run #545
Comments
I don't know how fast it is in your setup, but with the built-in templates here (e.g., Angular 2/React/etc), it takes about 2-4 seconds to do the first-time Webpack build, so it doesn't really feel problematic. How slow is it in your Vue setup? Is 2-4 seconds spent in Webpack an unacceptable delay for you after C# code changes, given that you're probably waiting 5-10 seconds for the server-side process to rebuild and restart anyway? Others haven't reported this as a concern.
Not really, I'm afraid. If anyone has suggestions to improve this please let us know. In the meantime I'll close this because I'm not aware of any action we could take on it. Hope that's OK! |
Actually one further thing: one possiblity is that we could change the webpack dev middleware logic to serve existing files from disk if they are present rather than waiting for newly-built files. This would make startup faster, at the risk of confusing people by serving |
Hi. You are right about the times you mention. ~11s for server and ~4s for webpack. Way too long, I'm afraid. I work at a php shop were people are used to making a change and reloading their browser instantly. I want to get them to try asp.net core, but 15s of wait time every time they press ctrl+s just won't fly. I like your idea about serving pre existing js files. Not sure under the what circumstances they could become out of sync with src files. Aren't they compiled immediatey on save? In any case, I would love to at least have the option. Right now I've had to separate the Vue dev server by having it run on its own process and not using this tool, but I've lost server side rendering and I'm forced to work with two CLIs. |
Also, if there's something that can be done here I'd rather the issue remained open and tagged as discussion, perhaps? You could change the title or open a new issue, maybe? |
I've set up a small project and so far most everything seems to work fine. My project uses the csproj model and for the frontend I've got Vue running (thanks to some resources I found here and elsewhere). HMR is pretty fast, but I'm not sure how you guys intend for people to run the server during development. I've got it set up to use
dotnet watch run
so I don't have to restart the server manually after backend code changes. The problem is everytime you dodotnet run
, webpack has to set itself up again from scratch, so you can imagine howdotnet watch run
feels.I'm fairly new to node and especially webpack, but a complete noob when it comes to dotnet core + node. I wonder if s there's a way to have
dotnet watch run
only recompile backend code? I figure I'd have to run webpack in a different process altogether, but I want to keep HMR + server side rendering, so I want to get your insight.Thank you.
The text was updated successfully, but these errors were encountered: