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

schemas/cleanup: replace vsfsgen w/ Go stdlib's embed #1070

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Sep 12, 2022

Closes #517

This represents a minor tech debt cleanup in preparation for #990

@radeksimko radeksimko added this to the v0.29.3 milestone Sep 12, 2022
@radeksimko radeksimko requested a review from a team as a code owner September 12, 2022 09:34
@radeksimko radeksimko self-assigned this Sep 12, 2022
@radeksimko radeksimko merged commit 14f45f2 into main Sep 12, 2022
@radeksimko radeksimko deleted the td-replace-vfsgen-with-embed branch September 12, 2022 13:54
radeksimko added a commit that referenced this pull request Oct 4, 2022
vsfsgen used GZIP compression by default but we abandoned it in favour of the stdlib embed package in #1070. This alone resulted in 80M binary size (compared to 18M before). Breaking down schemas to individual files would further increase binary size to 160M. In either case this is well over the limit of what we can pack into VSIX (VS Code extension) - currently 30MB.

Using gzip compression can bring the size to 19M. Mentioned sizes reflect darwin/arm64, but differences on other platforms should be similar.

Crucially, the compression doesn't seem to affect the time to load the (now compressed) file into memory.
This remains between <1ms and 130ms.
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Go 1.16 native go:embed instead of vfsgen
2 participants