1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

Ladybird: Disable HTTP2 as it's significantly slower

The slowdown is sometimes 5x, possibly more.

This is trivially confirmed by adding a large JS file to a page and
comparing the load time with a simple wget.
This commit is contained in:
Andreas Kling 2022-11-07 11:03:36 +01:00 committed by Andrew Kaster
parent 216192143e
commit bc6a6190d8

View file

@ -42,6 +42,9 @@ ErrorOr<NonnullRefPtr<RequestManagerQt::Request>> RequestManagerQt::Request::cre
request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::ManualRedirectPolicy);
request.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
// NOTE: We disable HTTP2 as it's significantly slower (up to 5x, possibly more)
request.setAttribute(QNetworkRequest::Http2AllowedAttribute, false);
QNetworkReply* reply = nullptr;
for (auto& it : request_headers) {