Way to speed up append strings?

jbv jbv.silences at Club-Internet.fr
Sun Nov 14 09:39:50 CST 2004



Frank,

>
> My question is this: is there a way to tell RunRev that I want it
> should start with a big string block (e.g. 64K of memory), when I first
> create the string?
>

if you know that your string won't grow bigger than 64K
(for instance), you can try to create the string that way :

    put " " into myString
    repeat while number of chars of myString<64000
      put myString & myString into myString
    end repeat

Rev should create a string of 65,536 spaces.

Then, when you update the content of your string, you
shouldn't use "put ... after", but rather :

    get myString & newData
    put it into char 1 to (number of chars of it) of myString

Hope that helps,
JB



More information about the use-livecode mailing list