Re: Processing overhead for unconnected nodes in AUGraph?
Re: Processing overhead for unconnected nodes in AUGraph?
- Subject: Re: Processing overhead for unconnected nodes in AUGraph?
- From: William Stewart <email@hidden>
- Date: Tue, 11 Mar 2008 16:03:24 -0700
On Mar 11, 2008, at 12:38 PM, Todd Blanchard wrote:
Is there any?
There shouldn't be - if they aren't connected into a signal chain then
they won't be asked to render.
Background:
I just reconfigured the guts of my application last night.
My app is focused on live performance. Other than that it acts like
most DAWs but it doesn't do recording or playback. It has a list of
songs that the user switches between and I had been using a separate
AUGraph for each song. When the user selected a song, I called stop
on the current song's graph and start on the new song's graph. The
idea was to keep them 'warmed up' and ready to switch fast.
However, as my set list now tops 50 songs, it has become clear that
I was running into memory problems. Each song had an AUGraph, a hal
device, a couple of matrix mixers, up to six virtual instruments and
maybe a couple of virtual effects. Performance got really slow with
40-50 of these graphs hanging around.
ok - but did you do some investigation as to what was going on here?
Shark/Instruments/XRay even sample could help for a basic view I
think. It doesn't seem to me that you've really identified the
problem, just thought that the problem could be that...
Soooo. I switched strategies. I have one AUGraph for a document.
When a song tries to create a node for a ComponentDescription, the
graph searches for a node matching that description that is not in
use (I keep a list of which nodes are being used).
The end result is I have one graph with a set of nodes that is the
union of all the different kinds of AU's in use, but at any given
time only some of the nodes are actually connected to anything.
This loads MUCH faster, and switching speed isn't really any worse -
but I'm noticing that I run out of CPU sooner.
you have to disconnect things.
I had kind of assumed that nodes that aren't connected to anything
would have no overhead. Is this true? If it is not true, is there
a way to make them 'dormant'? I'm not sending them any MIDI,
they're getting no input signals, and they're not producing output.
Have a look at the patch stuff in Leopard's AULab - we do exactly the
kind of thing you are talking about here - we disconnect the tracks
that aren't in use as you go from one "patch" of a session document to
another. You should see the change in the CPU Load meter we show as
you switch, and if you do the Debug printing of the session, you
should also see where we are doing the disconnection, etc.
HTH
Bill
-Todd Blanchard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden