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

feat: put the frontend outside of docker container #105

Closed
wants to merge 1 commit into from
Closed

Conversation

xnought
Copy link
Member

@xnought xnought commented Jan 9, 2024

Draft work in progress, don't merge yet

#116

Please let me know if this new method is faster (moving the frontend out of the docker container)

7432c8ed-e333-469f-aea0-791049e2ecf5.mp4

Watch the video where I go through the following steps:

All I do is

Go to this branch

git checkout faster

hard restart

./run.sh hard_restart

run the frontend not in the docker

cd frontend
yarn install
yarn dev --open

upload all the proteins to test stuff out

cd .. # go back to project root
./run.sh upload_all 

Go to http://localhost:5173

@ansengarvin
Copy link
Collaborator

I just took a look at this! I tested the website, once with the changes here and once without them. TL;DR: There didn't seem to be a significant increase in speed between either version, but both versions were loading quickly.

Both versions continue to have a problem on my machine where Vmmem (which Docker instantiates) keeps consuming memory once the docker containers are stopped. I suspect this has nothing to do with our code, however, and that it's just a problem with how Windows interacts with WSL (maybe even only on my machine).

Some statistics! This is what my task manager showed after closing out docker:

Version without frontend in docker (this version):
vmmem

Version with frontend in docker (in main):
vmmem2

You can see that there was a small reduction in memory usage, but it didn't seem to greatly increase load times for me. I ran both of these tests immediately after restarting my computer and with no additional programs running, which I believe may have been a large factor in it being slower on my computer.

While it didn't seem to greatly increase speeds for me, I think we should have the others try it on their machines and see if they notice a significant difference. I also think it's going to be important to try to test this on the deployment server, just so we can bypass any weirdness that our individual dev environments might bring.

@xnought
Copy link
Member Author

xnought commented Jan 12, 2024

So weird. Thank you so much for the effort in trying, I appreciate it greatly! Atleast we know now it wasn't the frontend that was super slow (probably).

@xnought
Copy link
Member Author

xnought commented Jan 12, 2024

Conclusion, no big difference, so look into other ways to speedup.

@xnought xnought deleted the faster branch January 19, 2024 19:12
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.

2 participants