VirtioFS Cuts Vite Reload Speed in Half

I use a docker container to build a fairly large hugo static website and vite to build some javascript. The reload time from saving a file and vite reloading the browser was exceeding 8 seconds. Enabling VirtioFS as the file sharing service (Docker Desktop -> Settings -> “Choose file sharing implementation for your containers”) compared to gRPC FUSE, speeds up builds 2x for me. That’s because hugo rebuilds every file every time it’s run which needs to be sync’d to the container before it’s picked up by vite and reloading the browser.

Nice!