szmarczak / http2-wrapper

Use HTTP/2 the same way like HTTP/1
MIT License
240 stars 18 forks source link

Check whether a preconnect promise is already pending #35

Closed szmarczak closed 4 years ago

szmarczak commented 4 years ago

https://github.com/szmarczak/http2-wrapper/blob/03f0b154c474e5766b055d5d6bb307af33ae97b1/source/client-request.js#L117-L119

Currently, when you make 100 requests at once, it will use additional 100 promises to trigger preconnect. It should check if a query is already pending, and not make another promise in that case.

szmarczak commented 4 years ago

Got rid of it, there's almost no improvement at all.