wasp start can be faster building?

When you make changes in your Wasp app and stop and do wasp start again, how long does it take? Or for example I work from windows with wsl, on a real linux would that compilation time be faster?
8 Replies
kapa.ai
kapa.ai4w ago
Hi @NEROX. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The speed of the wasp start command can depend on several factors, including your operating system and the specific changes you've made to your Wasp app. If you're using WSL (Windows Subsystem for Linux) on Windows, you might encounter issues with wasp start not picking up changes. This is a known issue with WSL2 when your source files are stored on the Windows filesystem, not the WSL's Linux filesystem. The recommended solution is to keep your source files on the Linux filesystem source (https://github.com/wasp-lang/wasp/issues/603). In terms of improving the speed of the build process, there's an open issue on the Wasp GitHub page discussing the introduction of a delay (e.g., 1 second) for recompilation upon file change to avoid redundant recompilations when rapid changes of files occur source (https://github.com/wasp-lang/wasp/issues/191). There's also a closed issue discussing the high memory usage (~1 GB) of wasp start when running the frontend, which could potentially affect the speed of the build process source (https://github.com/wasp-lang/wasp/issues/955). However, without more specific information about your setup and the changes you're making, it's difficult to provide a more precise answer. If you're experiencing slow build times, it might be worth reaching out to the Wasp community on Discord (https://discord.com/channels/686873244791210014/1207695305353596928) for more targeted advice. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @NEROX, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
martinsos
martinsos4w ago
How long does it take for you? Btw you shouldn't have to do that, once you run wasp start it should keep running and you are good, it will pick up file changes and quite quickly (matter of seconds) reload the app. If you don't have that happening, the reason might be, on WSL, that your files are on windows file system instead of linux file system.
NEROX
NEROX4w ago
I think it's the second reason, I'm moving all the folder app to Linux, it's moving all the node modules too xD
Kelly Ellie
Kelly Ellie4w ago
I'm on windows/WSL and have to restart to see changes too.
martinsos
martinsos4w ago
Ok, solution should be to ensure your files are on linux file system, not on windows file system. It is an issue/bug with WSL2 and file wathcing. Let me know if it helped or not!
NEROX
NEROX4w ago
I finally managed to transfer the whole project to WSL! The hot reload is working :) https://i.gyazo.com/83616c9e426ce383977025f9baeb595a.mp4 pd: I'm opening from the wsl path and for some reason I get all errors but the application compiles fine. This didn't happen before when I had the files in Windows :(
No description
NEROX
NEROX4w ago
Just restarted my pc and the "underlines" error disapeared. @martinsos : When you asked me at the beginning how long it took me to compile, at the beginning when I had the whole project in Windows it took about 10-15 seconds. Now with the whole project in Linux it takes about 5 seconds to compile. The wasp db migrate-dev now takes 1-2 seconds when it used to take more than 10 seconds in Windows
martinsos
martinsos4w ago
Great! Yeah I think you just needed to Wasp project to "reset". You can always run wasp clean in situations like these when you move stuff around or do some "wilder" changes to the project and something is misbehaving, to make sure all the caches and stuff are right.
Want results from more Discord servers?
Add your server