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

Reduce build times and frontend JS size by removing excess dependencies. #2147

Closed
gak opened this issue Jul 24, 2024 · 9 comments
Closed

Reduce build times and frontend JS size by removing excess dependencies. #2147

gak opened this issue Jul 24, 2024 · 9 comments

Comments

@gak
Copy link
Contributor

gak commented Jul 24, 2024

Currently it takes ~10s to build release on a M2, and 16.1 MB to serve in dev.

All FTL builds and most CI rely on this install.

@github-actions github-actions bot added the triage Issue needs triaging label Jul 24, 2024
@ftl-robot ftl-robot mentioned this issue Jul 24, 2024
@gak
Copy link
Contributor Author

gak commented Jul 24, 2024

Looks like this might be adding a lot of deps that we don't need: jsonnext/codemirror-json-schema#125

@gak gak self-assigned this Jul 24, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Jul 24, 2024
@gak
Copy link
Contributor Author

gak commented Jul 24, 2024

@gak
Copy link
Contributor Author

gak commented Jul 24, 2024

Removing codemirror deps and temporarily showing a blank div brings the build down to 3s and 1.7 MB.

@wesbillman
Copy link
Collaborator

@gak I just tried this locally on this branch and on main and didn't notice a massive difference:

this-branch: just build-all  22.41s user 9.17s system 144% cpu 21.893 total
main: just build-all  28.29s user 9.80s system 139% cpu 27.295 total

Definitely reduces the size though. I'm ok with pulling this out for now, but we might have to clean up the new version of the form a bit since this might be the most used feature on the console 😂

@wesbillman
Copy link
Collaborator

Also, without json-schema validation in the UI it might be really difficult for users to know what fields they need to send on a request. Maybe we need to solve that in another way, but there currently isn't a great way to see what should and should not be there. 🤔

@gak
Copy link
Contributor Author

gak commented Jul 24, 2024

I am bringing it back, just with less deps. It will at least save the size of the deploy at least.

@wesbillman
Copy link
Collaborator

Nice! Sounds great 👍

@gak gak removed their assignment Jul 25, 2024
@wesbillman
Copy link
Collaborator

I think this was "fixed" with #2183

@gak
Copy link
Contributor Author

gak commented Jul 30, 2024

Ah of course, closing!

@gak gak closed this as completed Jul 30, 2024
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

No branches or pull requests

2 participants