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

JS: Enable keepalives if using node-fetch #196

Merged
merged 1 commit into from
Dec 29, 2021
Merged

Conversation

svix-frank
Copy link
Contributor

@svix-frank svix-frank commented Dec 28, 2021

Uses a fork of isomporphic-fetch which enables keepalives if using node-fetch. Should significantly improve performance for subsequent requests in node, with no performance change when running in a browser context.

For changes see: svix-frank/isomorphic-fetch@fa230b6

Cursory review greatly improves performance:

Before:

calling create message...
Call took 404.8625639677048 milliseconds
calling create message...
Call took 300.6274639368057 milliseconds

After:

calling create message...
Call took 412.2045749425888 milliseconds
calling create message...
Call took 119.86126601696014 milliseconds

@svix-frank svix-frank requested review from tasn and a team December 28, 2021 22:55
Copy link
Contributor

@svix-liam svix-liam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏃 💨

@svix-frank svix-frank merged commit 7fcf175 into main Dec 29, 2021
@svix-frank svix-frank deleted the frank/js-keepalive branch December 29, 2021 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants