Fetching receipts takes a bit long #2513
haseebrabbani
started this conversation in
General
Replies: 2 comments 1 reply
-
What happens if you use the |
Beta Was this translation helpful? Give feedback.
1 reply
-
pinging on this again. i understand contributors may not be on the project fulltime, but i feel the performance drop measured here is significant enough to warrant a closer look. currently we are using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
first let me start by saying thank you for this awesome library used across the community ❤️ we recently switched over from web3.js to ethers.js primarily due to its much more compact size.
however, after this transition we noticed that fetching receipts (something we do a lot) was taking noticeably longer. we decided to do some benchmarking to compare fetching receipts using ethers.js, web3.js and plain old axios. you can view and verify the benchmarks located here (shoutout @emnul for helping with this).
this is what was observed for the amount of ms to fetch a receipt:
web3.currentProvider.send
took 245 msweb3.eth.getTransactionReceipt
took 294 msaxios.post
took 711 msethers.send
took 736 msethers.getTransactionReceipt
with JsonRpcBatchProvider took 1697 msethers.getTransactionRecipt
with JsonRpcProvider took 1862 mson average, ethers.js is taking 3-6x longer than web3.js to fetch a receipt. we're wondering how this could be improved, or if there are optimizations that we are not using. any and all feedback is welcome 🙂
Beta Was this translation helpful? Give feedback.
All reactions