You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently trying version ^6 to see if a performance issue was solved on version ^5 (ethersproject/contracts).
Using this abi single-call-balance-checker-abi, asking for multiple (1000 each time) tokens balances against the account address, created a big drop of JavaScript FPS on Android. When tried to do it with version ^6 the time changed from 9821 ms to 19725 ms.
The way it was tested:
const contract = new Contract(
contractAddress,
abiSingleCallBalancesContract,
provider,
);
const start = Date.now();
const result = await contract.balances([selectedAddress], tokensToDetect);
const end = Date.now();
console.log('ENTER time spent on contract.balances:', end - start);
I was able to trace down on version 5 a recursive function that it was using a lot of computational needs, that it was really noticeable with Android (Hermes enabled), making the app freeze/slow down.
I was not able to trace down what happened on version 6. Would love some thoughts from the maintainers! Also I'm here to help to trace down the issue.
If the maintainers have also an idea of how we could improve the performance on v^5 or create a fix for v^6 be more performative than v^5 I'm here to help as well!
Thanks for your time!
Code Snippet
const contract = new Contract(
contractAddress,
abiSingleCallBalancesContract,
provider,
);
const start = Date.now();
const result = await contract.balances([selectedAddress], tokensToDetect);
const end = Date.now();
console.log('ENTER time spent on contract.balances:', end - start);
Ethers Version
6.13.4
Search Terms
performance
Describe the Problem
Currently trying version ^6 to see if a performance issue was solved on version ^5 (ethersproject/contracts).
Using this abi
single-call-balance-checker-abi
, asking for multiple (1000 each time) tokens balances against the account address, created a big drop of JavaScript FPS on Android. When tried to do it with version ^6 the time changed from 9821 ms to 19725 ms.The way it was tested:
tokensToDetect = ["0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", "0x1e1f509963a6d33e169d9497b11c7dbfe73b7f13",...]
I was able to trace down on version 5 a recursive function that it was using a lot of computational needs, that it was really noticeable with Android (Hermes enabled), making the app freeze/slow down.
I was not able to trace down what happened on version 6. Would love some thoughts from the maintainers! Also I'm here to help to trace down the issue.
If the maintainers have also an idea of how we could improve the performance on v^5 or create a fix for v^6 be more performative than v^5 I'm here to help as well!
Thanks for your time!
Code Snippet
Environment
Ethereum (mainnet/ropsten/rinkeby/goerli), React Native/Expo/JavaScriptCore
Environment (Other)
Android with Hermes
The text was updated successfully, but these errors were encountered: