[directmusic] Re: Mem usage

  • From: "David Yackley" <davidy@xxxxxxxxxxxxx>
  • To: <directmusic@xxxxxxxxxxxxx>
  • Date: Sun, 29 Sep 2002 19:20:32 -0700

Aaron,=20
I couldn't tell from your post if you're measuring memory in Producer or
in runtime.  In Producer memory usage is going to be considerably
higher. =20
David Yackley (MS)

This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Scott Morgan [mailto:scott@xxxxxxxxxxxxxxxxx]=20
Sent: Sunday, September 29, 2002 4:31 PM
To: directmusic@xxxxxxxxxxxxx
Subject: [directmusic] Re: Mem usage


Make sure the wave is set as a streaming wave.  It helps to check 'don't
pre-roll' also.

The wave data will be uncompressed when it is loaded, but if its
streaming
it shouldn't be that big of a deal.  I notice about 1MB usage for one
streaming wave.

An 11MB container shouldn't use 22 MB unless you have a a bunch of
buffers
in your audiopath and are using DMOs (especially mutiple reverbs and
sends).

Hope that helps,

-Scott Morgan
http://Morganstudios.com


----- Original Message -----
From: "Aaron R Leiby" <aleiby@xxxxxxxxxxxxx>
To: <directmusic@xxxxxxxxxxxxx>
Sent: Sunday, September 29, 2002 5:58 PM
Subject: [directmusic] Mem usage


>
> Using my most scientific method of the TaskManager to track memory
usage,
> I'm noticing that with just a simple direct music script calling an
empty
> segment (tracks - tempo/timesig/wave/script), I'm getting about 2MB
boost
in
> memory use (the container file itself is 1.46kb).  When I have a
container
> (similar structure) just with more segments, and actual wav data
> (compressed), whose container weighs in at 3.08MBs, I'm seeing a 9MB
boost
> in memory use when I start the script (which includes initializing DM,
> etc.).  Our largest container weighs in at a hefty 11.5MBs, and
results in
> over 22MBs increase memory use.  (Memory usage appears to fluctuate
+/-
2MBs
> over the course of playing.)
>
> A) Does this sound right?
>
> B) What are some methods for reducing this?
>
> Some data points:
>
> o We're using VBScript for the scripts (since they use select
statements,
> rand, global vars, etc.).
> o Wav files are compressed using only Microsoft ADPCM.  We are
shipping
with
> simple streaming ogg vorbis music for much of the game, so it may be
worth
> me spending time to hook up similar compression for DM use?
> o Wav files are set Streaming with 500ms read ahead.
> o Script is flagged with "Load all content when script is loaded" --
> disabling this causes errors (apparently there is no automatic load on
> demand support and something the application writer is expected to
> provide?).
> o Script is flagged with "Download all segments when script is
loaded".
>
> Ideally, I'd like to only incur a fixed overhead for initializing
> DirectMusic, a small overhead for loading all the segment info,
script,
etc.
> (structure stuff), and then whatever is required for the streaming wav
pool
> (which I would expect to be the largest overhead, but certainly not an
order
> of magnitude larger than the source material).
>
>
> Thanks,
>
> Aaron.
>
>
>



Other related posts: