Forum

Multi-threading patches

I’ve been splitting patches into separate instances for ages now, and its almost always a bit of a pain in the bum! Getting communication to be seamless etc. What would be lovely is a new kind of sub patch that evaluates everything inside it in a separate non synchronous user defined thread (core), and delivers the result to the main patch when its done, so rather than the main patch waiting for a result, it gets updated in the next frame after completion. Its what I do now, but saves having to use udp or shared memory, and simplifies things like s and r nodes etc. and makes patch more seamless.
Renderers go in the main thread, processing of data can go in another, especially with things such as VR where you need frame rates to be as high as possible, this seems vital to me.
Is this feasible, or preclude by the architecture?

+1 but I suspect that the reply from the devvvvs is that this is something you should do with VL, which is what @tonfilm demonstrated at NODE15 with the audio engine

for vvvv the whole project is just one big graph. the subpatches are in a way only a visual structure for the user. the effort to extract the subpatch subgraphs, move them to another thread and make a data boundary that updates correctly (also the UI) is thinkable but not really practical in a the current vvvv delphi code.

but this was of course one of the many motivations to write a new and much better version of vvvv that - you guessed it - we call VL.

i am very sorry that this is not really satisfying and does not solve your current daily performance problem but it will in the bright future we are heading to.

for now, if you haven’t already, check out the networking capabilities of message-2.0 together with vvvv-zeromq which are designed to work seamlessly with each other. this gives you a generalized way to send basic data types over network and might make your life easier. not sure if there is such a general solution for shared memory.

you could also try & upgrade the stuff I posted https://vvvv.org/forum/vvvv-instances-communication#comment-113298 for inter-process communication.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.