Skip to content

Split up monaco's language chunks #12193

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

Closed
wants to merge 1 commit into from

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jul 8, 2020

This should speed up monaco's loading time by splitting the current 3.71MB chunk monaco.js into 63 individual files named 1 to 63.js in the output directory. There seems to be no way to get a better file naming scheme unfortunately. I opted to exclude those files in the webpack output for brevity.

Related: https://github.com/microsoft/monaco-editor-webpack-plugin/issues/113

@lafriks lafriks added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Jul 8, 2020
@lafriks lafriks added this to the 1.13.0 milestone Jul 8, 2020
@lafriks lafriks added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Jul 8, 2020
This should speed up monaco's loading time by splitting the current
3.71MB chunk monaco.js into 63 individual files named 1 to 63.js in
the output directory. There seems to be no way to get a better file
naming scheme unfortunately. I opted to exclude those files in the
webpack output for brevity.
@silverwind
Copy link
Member Author

silverwind commented Jul 8, 2020

monaco.js goes from 3.71MB to 2.23 MiB, so it's only 1.5MiB split out. Still a performance improvement, but not as big as I had hoped.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 8, 2020
@silverwind
Copy link
Member Author

I think I'm actually not going ahead with this. Those 1.5 MB are not that much of a saving and the issue with hidden chunks in the stats (with webpack default naming) is that we might miss changes in the webpack generation which could lead to bugs further down the road.

@silverwind silverwind closed this Jul 9, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants