Enable Content-Encoding: gzip to improve forgeperf.org benchmark scores #176

Closed
opened 2 years ago by mappu04 · 4 comments
mappu04 commented 2 years ago

The benchmarks at https://forgeperf.org/ (operated by SourceHut) show a poor result for Codeberg.

I think it is not entirely representative as Codeberg certainly seems quite fast to me (does the lighthouse test script preserve cached resources between tested URLs??), but, there are some easy wins that can be done.

Codeberg has put gitea directly internet-facing, but an nginx layer can be used to add gzip support. Or perhaps it could be patched into gitea (e.g. via the https://github.com/nytimes/gziphandler Go package).

The benchmarks at https://forgeperf.org/ (operated by SourceHut) show a poor result for Codeberg. I think it is not entirely representative as Codeberg certainly seems quite fast to me (does the `lighthouse` test script preserve cached resources between tested URLs??), but, there are some easy wins that can be done. Codeberg has put gitea directly internet-facing, but an nginx layer can be used to add gzip support. Or perhaps it could be patched into gitea (e.g. via the https://github.com/nytimes/gziphandler Go package).
Owner

@mappu04

Thanks for bringing this up!
We have enabled gzip compression now in haproxy for:

  • text/css
  • text/html
  • text/javascript
  • application/javascript
  • text/plain text/xml
  • application/json

Their lighthouse test simulates a mobile networks with ~1.6MBit/s, because the SourceHut founder thinks it is a realistic scenario for a developer to work with a mobile network.

So it is (at least for some benchmarks) pretty clear that a forge that looks almost identical to about:blank would win here 😆

Anyway, at least https://forgeperf.org/ and your comment hepled us to improve! 👍

@mappu04 Thanks for bringing this up! We have enabled gzip compression now in haproxy for: * text/css * text/html * text/javascript * application/javascript * text/plain text/xml * application/json Their lighthouse test simulates a mobile networks with ~1.6MBit/s, because the SourceHut founder thinks it is a realistic scenario for a developer to work with a mobile network. So it is (at least for some benchmarks) pretty clear that a forge that looks almost identical to about:blank would win here :laughing: Anyway, at least https://forgeperf.org/ and your comment hepled us to improve! :+1:
Owner

Codeberg has put gitea directly internet-facing

This is incorrect. It is behind a haproxy which is responsible for ssl and http2, and since today also does compression.

> Codeberg has put gitea directly internet-facing This is incorrect. It is behind a haproxy which is responsible for ssl and http2, and since today also does compression.
hw commented 2 years ago
Owner

We also added image/svg+xml.

Thank you for digging down on this!

We also added image/svg+xml. Thank you for digging down on this!
hw closed this issue 2 years ago
hw commented 2 years ago
Owner

You probably have seen this https://mastodon.technology/@codeberg/104133688512365495

Once again, a big thank you!

You probably have seen this https://mastodon.technology/@codeberg/104133688512365495 Once again, a big thank you!
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.