Comments (8)
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.
Works perfectly without parallelization! Also, the node setup is done with a few seconds rather than a few minutes!
from floppy.
Interesting. Can you send me a screen shot of the node setup, too. That could be helpful for finding the bottleneck.
from floppy.
Here you go (overview & detailed). As you see, more complex setups are possible :)
:
from floppy.
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.
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.
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.
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)
- List selecting/activating selects element below it HOT 1
- Greyed out connectors HOT 1
- Feature request: Hint message HOT 1
- Deleting nodes deletes conections HOT 1
- strings in object fields HOT 2
- License missing HOT 1
- Getting Floppy to run for the first time HOT 1
- How do you delete a node? HOT 3
- Entering values onto nodes: input not aligned with field provided. HOT 2
- Set Parameters for Nodes Rather than Inputs and Outputs HOT 1
- Error when importing Node: "cannot import name ControlNode" HOT 4
- Delete Connection without deleting Node HOT 3
- Error when launching Floppy : managedNodes.dat not found HOT 2
- [run] examples and tests HOT 4
- Error when launching Floppy: Segmentation Fault HOT 2
- How do I join the links between 2 nodes?
- Is there any way to move the canvas? HOT 1
- Error no module named luascript
- How can I run test on centos7?
- Flowchart desgin
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 floppy.