Re: [Audacity-devel] multithreading
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Richard A. <ri...@au...> - 2009-02-02 21:03:23
|
On Fri, 2009-01-30 at 08:46 +0300, LRN wrote: > > Though programming in multithread is harder than normal one, since the > > CPU enters a era of SMP even many-core, this feature is worthwhile. > > And as to the OpenCL or CUDA, they are still too new and far too > > limited for putting into generic use. > [1]"Do two things simultaneously" scheme requires Audacity redesign - it > has to be more threaded. OpenCL wouldn't help here. Recent > OnDemandLoading feature is an example of threaded design. > [2] "Do one thing in two threads, which makes it go ~2 times faster" > requires special implementation. That's where things such as OpenCL > would help. But it's not cost-effective to rewrite everything in > SMP-style. Only costly operations should be made parallel, everything > else would benefit more from threaded design (see [1]). Well put. Audacity has both CPU-bound and IO-bound effects, and quite a few where the balance is not far off even, depending on how good your CPU and HDD are. Redesign to do multiple things at once is _very_ hard work to do well and completely (think how much Micheal has had to do to stop his import threads treading on each others toes). Multi-threading single sections on a case-by-case basis is obviously less universal, but can be a shorter way to obtain a seriously quicker run of that effect. Unless the code inside the effect is seriously ugly to start with, it should be less work to do. Richard |