-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Refactor embedded assets and drop unnecessary dependencies #34692
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
Conversation
ae8ebc4
to
366982b
Compare
366982b
to
2f7e94d
Compare
e40c71e
to
2d0e6cb
Compare
2d0e6cb
to
1199e94
Compare
How does this work on a high level? Put gzipped assets into Where does the size benefit come from? |
See
Same as above, now:
|
What's the benefit over using something more established like https://github.com/vearutop/statigz? I guess we would need a webpack gzip plugin, but might still be worth it. Also, I wonder whether we could eliminate the |
It will bloat the binary about 20MB+
Not this PR's scope. |
If we make webpack write the |
There is no feasible plan at the moment, see the discussions in #26533 |
Any other questions? |
This comment was marked as outdated.
This comment was marked as outdated.
|
Please ignore my comment, the command parameters I executed are incorrect |
Hmm, found another problem with |
Made more fixes in 9981619 |
* giteaofficial/main: [skip ci] Updated translations via Crowdin Improve the performance when detecting the file editable (go-gitea#34653) Fix various problems (go-gitea#34708) Refactor embedded assets and drop unnecessary dependencies (go-gitea#34692) Bump minimum go version to 1.24.4 (go-gitea#34699) Update JS deps (go-gitea#34701) Fix markdown wrap (go-gitea#34697) [skip ci] Updated translations via Crowdin frontport changelog (go-gitea#34689) Improve instance wide ssh commit signing (go-gitea#34341)
We could consider replacing gzip with zstd for more size savings and better page loading performance. 71% of browsers globally support zstd encoding currently needs a third-party module, but it's very likely that it will be added in golang stdlib at some point: golang/go#62513. |
Then the key point is not here, but the "gzip middleware"
IMO it is still new, the supported browsers were released in recent year
TBH I don't have any expectations for Golang's feature, when it is ready, we use it; if it isn't ready, we use others. |
In any case, now that we have all this compression code in first-party, it should be easy to replace the encoding.
I think the value will be > 80% by the time 1.25 releases.
Me neither, I expect the go feature earliest in a year or two. But it's still good to know that we can eventually eliminate the third-party dependency. |
Maybe not, given that Safari lacks support: https://caniuse.com/zstd. But I guess the usage share of Safari users of gitea may be lower then the global average 😆. |
Benefits: