Comments (8)
From Koushik: "useETHprice and useTokenBalance is used in multiple places. So in a page there can be 5-6 requests every 10 seconds. We can move this to a context and use it from there. This will drastically reduce the calls. And instead of polling at time interval we can poll at new blocks"
from squeeth-monorepo.
hey @alexisgauba re-opening this again as the issue is still not complete fixed
from squeeth-monorepo.
5-6 requests in 10 seconds wouldnt be an issue in itself ( well relatively)
we are making close to 1.5 requests per second if you stay on page for 100 + seconds
but on initial load i see 100+ calls going out in first 1-3 seconds
from squeeth-monorepo.
@akwritescode new here and looking to contribute, I was asked by Anil to take up this issue. im trying to replicate the issue but where can I find the network monitor? are you referring to the browser tools?
from squeeth-monorepo.
@0xAlx0 awesome to meet ya and thanks for jumping in! yep referring to the browser tools! You'll notice that there are lots of calls coming from useSqueethPool and useController hooks in particular. That's where we make .call() smart contract calls to get data and where most of the requests are coming from.
from squeeth-monorepo.
@0xAlx0
Thanks for jumping on this one. This is Anil.
If you are considering to solve this through some improved state management, please do take a look this library https://github.com/derrickbeining/react-atom
That maybe helpful
Thanks
from squeeth-monorepo.
@akwritescode will look into it this weekend!
from squeeth-monorepo.
do you have any updates @0xAlx0 ?
from squeeth-monorepo.
Related Issues (20)
- Quantity output rather than limit price for generalSwap?
- Current profit threshold not calculating in strategies page
- Change sendBack() to send ETH as the last step HOT 1
- Is declaring interfaces repeatedly in line cheaper vs declaring it in memory and using it repeatedly or having it in storage HOT 1
- Doesn't support trading in potential oSQTH/USD pools
- FLASH_W_BURN returns oSQTH to user, but doesn't need to as it is done later in sendBack()
- flashswapWBurnBuyLong() doesn't let a user without a vault (ie vault 0) buy oSQTH without burning
- Naming improvements HOT 2
- Natspec/comments review + improvements
- Update DataTypes for consistency
- Fix interface pulling ropsten data on mainnet and mainnet data on ropsten
- Hardcoded uniswap pool in a few places HOT 1
- change way that getAmountsToLp is returned in rebalanceWithoutVault()
- RebalanceVaultNft - DecreaseLpLiquidity along with DepositIntoVault will often fail
- BurnExactRemoved flag in rebalanceNftVault() fails at times
- Allow users to go short even if they have some long position and vice versa by changing hard block into overrideable warning
- Crab Position Value can be off by up to `2 * priceHedgeThreshold` (currently +-40%)
- Potential Minor Gas Savings
- Update crab accounting to burn a min amount of liquidity on initial deposit and have min amount of deposit
- Fix 1wei diff issue in test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from squeeth-monorepo.