Skip to content
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

Http2 downloads are super slow #1520

Closed
2 tasks done
kanongil opened this issue Nov 4, 2020 · 4 comments
Closed
2 tasks done

Http2 downloads are super slow #1520

kanongil opened this issue Nov 4, 2020 · 4 comments
Labels
bug Something does not work as it should external The issue related to an external project nodejs bug

Comments

@kanongil
Copy link

kanongil commented Nov 4, 2020

Describe the bug

  • Node.js version: v14.14.0
  • OS & version: macOS 10.15.7

Http2 downloads are horrendously slow due to nodejs/node#31084, with no workaround.

Note: the actual transfer speed will vary drastically depending on your link speed and the RTT to the server.

Actual behavior

Super slow transfer: default: 48.537s

Expected behavior

Something matching the http2: false speed, which returned: default: 10.923s

Code to reproduce

const Got = require('got');

(async () => {

    console.time();
    await Got.get('https://mirror.leaseweb.com/speedtest/100mb.bin', { http2: true });
    console.timeEnd();
})();

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.
@szmarczak szmarczak added the external The issue related to an external project label Nov 4, 2020
kanongil added a commit to kanongil/node-uristream that referenced this issue Nov 5, 2020
@szmarczak szmarczak added the bug Something does not work as it should label Mar 21, 2021
@szmarczak
Copy link
Collaborator

Fixed in [email protected]

@kanongil
Copy link
Author

@szmarczak Won't your update crash on node 14? You unconditionally call a non-existing API in your patch.

@szmarczak
Copy link
Collaborator

Got throws if you're trying to run HTTP/2 on Node.js lower than 15.

@szmarczak
Copy link
Collaborator

So no, it doesn't crash because it doesn't call that function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as it should external The issue related to an external project nodejs bug
Projects
None yet
Development

No branches or pull requests

3 participants