Giter Site home page Giter Site logo

Comments (8)

JLuebben avatar JLuebben commented on August 17, 2024

Could be a synchronization issue. Can you try switching the comments in line 193 and 194 in runner.py. That way the interpreter will run all nodes in the main thread. If that solves the problem I know synchronization is the problem.

from floppy.

k-eks avatar k-eks commented on August 17, 2024

Works perfectly without parallelization! Also, the node setup is done with a few seconds rather than a few minutes!

from floppy.

JLuebben avatar JLuebben commented on August 17, 2024

Interesting. Can you send me a screen shot of the node setup, too. That could be helpful for finding the bottleneck.

from floppy.

k-eks avatar k-eks commented on August 17, 2024

Here you go (overview & detailed). As you see, more complex setups are possible :)
screen shot 2016-09-23 at 16 41 46
screen shot 2016-09-23 at 16 41 58
screen shot 2016-09-23 at 16 42 08
screen shot 2016-09-23 at 16 42 24

:

from floppy.

JLuebben avatar JLuebben commented on August 17, 2024

Thanks. I never tested larger setups.
I am currently on vacation. When I am back, I will probably need a dedicated Floppy fixing week..

from floppy.

JLuebben avatar JLuebben commented on August 17, 2024

I thought about this issue. There are definitively some problems with synchronization in the current version that I need to fix. But I also thought about changing concurrent node execution from 'opt-out' to 'opt-in' meaning that nodes won't be run concurrently by default but only when the node was decorated with an '@parallelNode' decorator. The previous idea was to have a '@sequentialNode' decorator for all nodes that are not supposed to run concurrently.

I consider this because a lot of nodes do trivial things like splitting a string, adding numbers, implement looping, etc. These nodes do not benefit from concurrency at all because the overhead added by creating threads for them is bigger than the benefit of having their own thread. In fact, in many cases there is no benefit at all.

If I choose the 'opt-in' approach, the person writing a node knows whether the global interpreter lock is released within the 'run' method and if it is the person can make that node run concurrently.

I assume this would greatly improve performance for graphs that consist mainly of 'generic' nodes but I would like to get some feedback before changing things.

PS: I guess I could also implement something like a 'force concurrency' and/or 'force sequential execution' option for the interpreter to override node specific behavior.

from floppy.

k-eks avatar k-eks commented on August 17, 2024

I gave this some thought and examined my larger setups. Most things run in a sequential manner anyways. There are some computational more expensive things, like breaking down a structure or sorting algorithms, and I think it should be up to the programmer to decide which parts can be reasonably done in parallel. Therefore, I think that the opt-in is probably the better way to go with things.

from floppy.

JLuebben avatar JLuebben commented on August 17, 2024

This should be fixed in newer versions. Older versions had synchronization issues that are fixed now.
New versions allow to switch between parallel and sequential execution mode via the settings menu.

from floppy.

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.