Hmm, looks like I was perhaps a bit hasty in ruling out a list based
approach. I had assumed that it would be no faster than the internal search
that director likely uses when searching its own cast. Thanks for pointing
this out, I'll ceratinly give it a try.
Kevan Dettelbach
----- Original Message -----
From: "Valentin Schmidt" <[EMAIL PROTECTED]>
To: "Lingo programming discussion list" <[email protected]>
Sent: Monday, February 13, 2006 1:08 PM
Subject: Re: <lingo-l> Finding cast members quickly...
Kevan Dettelbach wrote:
1. For each level, compile a look-up table to determine which images
exist at that level. Drawback: due to the number of images involved, this
look-up table would be huge, and memory is very tight in this program
already
to the number of large images being moved in and out of memory all the
time.
hi kevan,
are you sure that a simple list with all the member names would make any
difference for the memory?
e.g. 2000 strings à 12 chars would be 24000 bytes, plus some director
overhead, so let's say 30 KB, which is almost nothing compared to image
data etc.
in a simple test it took director just a millisecond on my computer to
find outh that a certain string didn't exist in a list of 2000 stings
(tExists= tTestList.getPos("someString"))
cheers,
valentin
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L
is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]