From bc6a6190d8a329959ea92417acabb5df3fa3c3e3 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 7 Nov 2022 11:03:36 +0100 Subject: [PATCH] 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. --- Ladybird/RequestManagerQt.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ladybird/RequestManagerQt.cpp b/Ladybird/RequestManagerQt.cpp index fa51c524ea..dca26f2758 100644 --- a/Ladybird/RequestManagerQt.cpp +++ b/Ladybird/RequestManagerQt.cpp @@ -42,6 +42,9 @@ ErrorOr> 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) {