-
Notifications
You must be signed in to change notification settings - Fork 122
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
Consider switching to undici library for http requests #134
Comments
it does not support the browser. axios is a good all-rounder. if you replaced axios with undici for nodejs, would you also replace it with something in the browser? are native browser fetch calls faster? the code base is already split with a custom solution supporting nodejs crypto and webcrypto, so it's not totally unreasonable to split it further - although the cypto-drivers could probably be replaced by a single external library ? - but that's off topic I will let someone else way in with opinion here, but if we decide to go that way would you be willing to do a PR for it? |
I believe the best solution would be to prepare an isomorphic-fetch, with undici as a library used by node (sth. similar to https://www.npmjs.com/package/isomorphic-fetch). |
maybe it could also speed up a bit #128 |
we've created https://github.com/redstone-finance/redstone-isomorphic (which has isomorphic version of fetch - uses undici for node and native fetch for web). |
https://www.npmjs.com/package/undici
Simple benchmark:
That's 2x the difference...
The text was updated successfully, but these errors were encountered: