[JW Lua] Parallel processing

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Wed Sep 3 09:54:42 CEST 2014


Jan,

Processing data in multiple threads will not boost the CPU or anything 
like that. However, if CPU cores are idle, calculations can sometimes be 
processed faster with multiple threads running on different cores.

But in the case of Finale, where the resource (the Finale document) is 
in a single pipe, it would be very difficult to get any speed boost 
since a semaphore in one thread could easily block the other threads. Or 
it could also result in threads overwriting data that other threads changed.

Multi-threading works well for separate buffered processes, like 
downloading, playback, printing, screen painting, timers, etc, but in my 
experience data processing tends to get slower and much more complicated 
when distributed through multiple threads.

I'll investigate if I can get Finale's progress bar feature to work with 
the JW Lua iterators.


Best regards,

Jari Williamsson


On 2014-08-13 15:32, Jan Angermüller wrote:
> Jari,
>
> just a nice-to-have-idea: would it be possible to speed up JW Lua with
> parallel processing ? I already suggested it to MakeMusic some time ago
> for  some of their slow plugins or functions on huge orchestra scores.
>
> Most (not all) JW Lua scripts work staff-independent,
> so making for ... loops on staves work parallel should theoretically
> be possible for many plugin tasks.
> E.g. processing 30 staves with 60 measures in 12 parallel processes
> would speed up the plugin tremendously.
>
> Jan
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>






More information about the JWLua mailing list