Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves 1473: Improve load times after changes from within Docker container #1474

Merged

Conversation

athersharif
Copy link
Collaborator

fixes #1473.

following #1364 (comment), this is a change to improve the load times after changes from within the container. this is a workaround to an issue that Docker for Mac has, and like every workaround, this should be thoroughly tested on other OSs as well. :)

we'd need to test:

  • does this change improve load times on the docker container on Mac?
  • does this change affect the functionality on Linux and Windows at all?
  • are there any other performance degradations?
  • is there anything we can improve wrt dockerizing that may or may not be related to this change?

here's a screen recording on Mac after this change (let me know if the link doesn't work): https://drive.google.com/open?id=1YpCilah2rhffCqGSYcIN6Fw5pfZ9QLS_

@ghost ghost assigned athersharif Feb 15, 2019
@misaugstad
Copy link
Member

Dibs on Linux!

@misaugstad misaugstad self-requested a review February 16, 2019 01:27
@athersharif athersharif force-pushed the 1473-dev-environment-slow-to-update-javascript-files branch from 90af438 to 00f39a1 Compare February 21, 2019 02:53
@misaugstad
Copy link
Member

I didn't experience any performance degradation on Linux. Works just fine!

here's a screen recording on Mac after this change (let me know if the link doesn't work):

The link does not work (404 error)

@athersharif
Copy link
Collaborator Author

@misaugstad can you try https://drive.google.com/file/d/1YpCilah2rhffCqGSYcIN6Fw5pfZ9QLS_/view? seems like github took the trailing underscore out of the hyperlink lol.

@misaugstad
Copy link
Member

Yep that works!

Copy link
Member

@misaugstad misaugstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't experience any performance degradation on Linux. Works just fine!

@athersharif
Copy link
Collaborator Author

cool. do we have reviews from Windows and Mac users?

@misaugstad
Copy link
Member

I believe @shivenbhatt is doing Windows and has started but not finished reviewing. Haven't found a Mac user yet (but was waiting until we deployed to Newberg before I really pushed it on anyone else).

@athersharif
Copy link
Collaborator Author

i'd suggest having a mac user test it now as originally this issue was reported by @aileenzeng who is a mac user.

@aileenzeng
Copy link
Member

@misaugstad @athersharif I can test on Mac! I’m in-between tasks atm and have some time now

@aileenzeng
Copy link
Member

does this change improve load times on the docker container on Mac?

Yep! To change JavaScript files, it probably takes about ~20 seconds on my computer to make the change and reload the page (which is significantly better than what it was before!). In comparison, I think it takes about 15 seconds with the old setup.

are there any other performance degradations?

Changing .scala files (like controllers and such) takes longer - maybe around 2-3 minutes for the page to reload? I think on my local dev environment it takes 40 seconds for the page to reload.

@AmethystGear
Copy link
Collaborator

It takes a while longer to update JavaScripts on this new branch for windows. On this branch it takes around 40-60 seconds, on the develop branch it took around 10-12 seconds.

@misaugstad
Copy link
Member

I'll also try to test on Windows myself this week.

@michaelduan8
Copy link
Collaborator

It seems that the :delegated flag is mainly intended as a performance tuning measure for Mac users (as shown in this docker documentation https://docs.docker.com/docker-for-mac/osxfs-caching/). For me (Mac), I'm getting very good speed ups, with my compile time for javascript changes taking before around 2-3 min and now averaging ~10 seconds. Similarly, for the sbt compile, I'm noticing it's now taking around ~15 seconds compared to the 1-2 min prior to testing this flag.

@jonfroehlich
Copy link
Member

jonfroehlich commented Jun 16, 2020 via email

@misaugstad misaugstad merged commit 727557c into develop Sep 17, 2020
@misaugstad misaugstad deleted the 1473-dev-environment-slow-to-update-javascript-files branch September 17, 2020 03:51
@misaugstad misaugstad mentioned this pull request Sep 17, 2020
@mcdoerr
Copy link
Collaborator

mcdoerr commented Feb 11, 2021

I was running into (15sec - more than a minute) load times with the occasional extremely long load time of about 3 min. I fixed this issue by allocated more CPUs and memory to the docker container, through docker desktop.

The changes for the docker container were 1 CPU -> 4 CPUs and 2GB memory -> 4 GB memory, though I suspect the CPU is what made the difference, not the memory.

Load times are now under 10 secs.

Running on macos big sur 11.2.1, docker version 20.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dev environment slow to update Javascript files
7 participants