-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
WIP - Replace esc with "embed" for packaging UI assets #2850
Conversation
As I was afraid, the binary size goes up a lot (+13Mb) without doing some explicit compression:
|
Codecov Report
@@ Coverage Diff @@
## master #2850 +/- ##
==========================================
- Coverage 96.47% 95.99% -0.49%
==========================================
Files 260 242 -18
Lines 15215 14789 -426
==========================================
- Hits 14679 14196 -483
- Misses 453 513 +60
+ Partials 83 80 -3
Continue to review full report at Codecov.
|
If all files are gzipped, then the size is comparable with esc (even a tiny bit smaller)
|
Found a brand new library by @vearutop that serves gzipped files https://github.com/vearutop/statigz. Not sure if we want to use it. It might conflict with our usage of |
@albertteoh fyi |
Combining The problem is that r.Header.Del(acceptEncoding) In such case |
Pull request has been modified.
What's the status of this PR? |
It needs to be done, but I didn't have time. Currently it blows up the size of the binaries unless we introduce a new lib dependency. |
Do you think an Outreachy candidate would be able to tackle this if a good description is provided in an issue? |
yes, it's a fairly straightforward piece. |
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
incorporated into #3399 |
Part of #2749, closes #3229
go:embed
in the build to pack UI assetsembed.FS
as a source for HTTP server for static assetshttp.FileSystem
that can read gzip-compressed files fromembed.FS
(similar to https://github.com/vearutop/statigz, but we want to avoid 3rd party dependency)