There's got to be a better way

ron barber rbarber at yhb.att.ne.jp
Wed Apr 13 14:38:46 EDT 2005


Thanks Richard,
as always, very helpful.

Distinguishing 'open' as read into memory and as receiving the openxxx 
messages was where I was fuzzy.

Ron

ps - sorry for the personal post, I'll be more patient next time...

On Apr 13, 2005, at 12:59 PM, Richard Gaskin wrote:

> ron barber wrote:
>> On Apr 12, 2005, at 7:38 PM, Richard Gaskin wrote:
>>> Here's a tip to get even better performance (sometimes as much as 
>>> two or three times more): use a field in an unopened window for the 
>>> translation.
>>>
>>> When a field is on the current card, even if hidden, it's 
>>> initialized with additional things that don't come into play when 
>>> accessing a field on an unopened card.
>> I'm a little confused about the unopened part.
>> Is the unopened card on the stack that you are working on but on  "cd 
>> 2" or is the unopened cd on a separate stack altogether (a substack 
>> for example)? I thought that refering to a fld in an unopened stack 
>> would open that stack?
>
> The field can be on any unopened card to get the optimized 
> performance, whether in the same stack or a substack or a separate 
> stack file.  I tend to use a substack to hold miscellaneous parts, so 
> that's why I mentioned a stack, but really any of those will do.
>
> Stack files are not "opened" per se when you merely read or write 
> properties or object contents from them, in the sense that they do not 
> appear visually and do not recieve the opening messages (preopenstack, 
> preOpenCard, openStack, openCard, etc.).
>
> But stack files are read from disk and loaded into memory in order to 
> access those properties.
>
> Substacks, on the other hand, are already in memory if the mainstack 
> is in memory since the entire stack file is read at once.
>
> So if the choice is a stack file that's not already open, it will 
> indeed required it to be read into RAM so a substack or second card 
> would be faster.
>
> --
>  Richard Gaskin
>  Fourth World Media Corporation
>  __________________________________________________
>  Rev tools and more: http://www.fourthworld.com/rev
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list