Git Product home page Git Product logo

Comments (8)

alexisgauba avatar alexisgauba commented on September 11, 2024 1

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.

akwritescode avatar akwritescode commented on September 11, 2024 1

hey @alexisgauba re-opening this again as the issue is still not complete fixed

from squeeth-monorepo.

akwritescode avatar akwritescode commented on September 11, 2024

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.

bonjour-good-day avatar bonjour-good-day commented on September 11, 2024

@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.

alexisgauba avatar alexisgauba commented on September 11, 2024

@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.

akwritescode avatar akwritescode commented on September 11, 2024

@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.

bonjour-good-day avatar bonjour-good-day commented on September 11, 2024

@akwritescode will look into it this weekend!

from squeeth-monorepo.

akwritescode avatar akwritescode commented on September 11, 2024

do you have any updates @0xAlx0 ?

from squeeth-monorepo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.