Giter VIP home page Giter VIP logo

Comments (4)

tiagofilipe12 avatar tiagofilipe12 commented on May 29, 2024

Also attempted to use async module from caolan, but concurrency seems not to work properly.
experimental implementation:

          // setup concurrency

          const queue = async.queue(addAllNodes, 10)

          queue.drain = () => {
            console.log("finished")
            // after getting all nodes, setup another concurrency for all links
            const queue2 = async.queue(addAllLinks, 10)

            queue2.drain = () => {
              console.log("finished 2")
              renderGraph()
            }
            // attempting to queue json.links, which are the links to be added to the graph AFTER adding the nodes to the graph
            queue2.push(json.links)
          }
          // attempting to queue json.nodes which are basically the nodes I want to add first to the graph
          queue.push(json.nodes)

It basically runs equal to the implementation with no concurrency handling.

from patlas.

tiagofilipe12 avatar tiagofilipe12 commented on May 29, 2024

This is still unsolved, but refactored it to use promise like structure and not async modules related functions (which were using to many resources). Check this commit

from patlas.

tiagofilipe12 avatar tiagofilipe12 commented on May 29, 2024

may be now we can use bluebird concorrency since we have migrated to yarn + webpack installation type.

from patlas.

tiagofilipe12 avatar tiagofilipe12 commented on May 29, 2024

This issue was fixed in this commit.

from patlas.

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.