Build speed slow on Macbook pro

default discord avatar
jakey___
4 months ago
2

I'm generally working on my high powered gaming rig, but in the office, most of my co-workers are on macs and they report 2-5min long build times in payload. Is there something that could maybe be temporarily disabled or something to improve code iteration?



I think I figured out my issues here (a month later, lol).



So one factor that I left out of my setup is that I'm using a docker-compose file to spin up mongo, nextjs, payload and mongo-express for development purposes.



The main difference between my PC and the Macs my co-worker and I were using is the method being used to handle file-sharing between the host system and docker. Memory and CPU access are similar between both environments.



On my PC, I presume it has to do with WSL (Windows Subsystem for Linux) which is very fast.



On our Macs, Docker was configured to utilize gRPC for filesharing.



I noticed there was another option labelled "VirtioFS" which is stated to be more optimized, so I tried it.



My build times went from 5min to 4sec after that.


My coworker's build times saw similar, results (down to 17sec). Which is much more bearable.



TLDR

; If you're on a mac, and you're using docker to handle running payload, make sure you're using

VirtioFS

for filesharing and that your docker engine is up to date.

  • default discord avatar
    notchr
    2 months ago

    I would have guessed it was the sharp build

  • default discord avatar
    jakey___
    2 months ago

    That was my thought too at first

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.