Giter Club home page Giter Club logo

Comments (4)

slawlor avatar slawlor commented on May 4, 2024 1

Hey @eozturk1, so in the MySQL storage layer we already have a caching scheme implemented. By using the preload_nodes_for_insertion you're effectively using batch get operations rather than individual get ops. Anytime a record is retrieved, we're appending it to the cache so you don't need to worry about manually inserting them into any cache, it's auto-magic ;)

The bulk-get is MUCH fewer db ops which is why it's helpful to retrieve them all before, then after that it's just memory operations which are super cheap. Even though we're double-getting data, it's still way more performant and makes the code transparent to the AKD dev.

from akd.

eozturk1 avatar eozturk1 commented on May 4, 2024

Looking at the preload_nodes_for_insertion function, it retrieves the nodes from storage but I am not sure how it achieves the caching we would like to have. I might be missing something here but the function does not seem to keep the nodes, e.g., in memory. How do we want to cache the nodes for bulk lookup proofs?

from akd.

eozturk1 avatar eozturk1 commented on May 4, 2024

Ah, that's perfect! Just saw the TimedCache.:) I'll use the same batch ops for bulk proofs.

from akd.

eozturk1 avatar eozturk1 commented on May 4, 2024

I'll close this one since the bulk of the task has been completed in #163. The remaining optimizations are tracked in #166, #167 and #169.

from akd.

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.