mistercrunch commented on PR #27434:
URL: https://github.com/apache/superset/pull/27434#issuecomment-1986602087

   Notes about docker-compose viability as the main tool for development ->  I 
just did a session with Ross, and we've found that his 8GB macbook M1 struggles 
quite a bit running `docker-compose up`, especially when it comes to running 
`npm i` and `npm run dev` INSIDE docker, specifically this stuff -> 
https://github.com/apache/superset/blob/master/docker/docker-frontend.sh#L25-L29
 . I'm guessing it was swapping like crazy. Super super slow. 
   
   Historically `npm i; npm run dev`, even with more memory was crippled by the 
filesystem vritualization being super slow on Macs too. Running those commands 
means touching millions of files in the node_modules folder and that didn't 
work well. So maybe it's memory/swapping and/or it's Docker version / IO issue.
   
   In any case, I think it'd be worthy to consider an alternative approach, the 
one where you run these two commands in the host as opposed to inside the 
docker. This has tradeoffs, but on Ross' machine was MUCH faster. 
   
   So.
   
   1. looking into having 2 modes - build-frontend-in-docker or 
build-frontend-in-host, maybe directed by an ENV var and documented properly. I 
think build-frontend-in-docker should be the default, and that people with less 
memory would flip the switch to build-frontend-in-host
   2. currently we waste some work since docker build has `npm i; npm run 
build` in a layer, but we redo it after mounting locally, it'd be nice if we 
could skip that step, but may be tricky to have conditions/composition in the 
Dockerfile


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to