Performance Problem with large file

Len Morgan len-morgan at crcom.net
Thu Feb 22 12:05:05 EST 2007


Len Morgan wrote:

> > ...the problem is that I'm displaying the file in a rather large
> > text field as it is being built up.  Each line of the CSV file
> > generates about 40 lines of XML.
>   

>That's one reason I rarely bother with XML.  :) 

Unfortunately, this isn't my choice.  The XML file is sent to a computer that processes telephone calls (for inmates in prisons) and that is the format the vendor is using.

> > In the test file I have, it takes about 3 seconds per record
> > (total of 98 records).   Just to see where the hang up was, 
> > I set the visibility of the output field to false, generated
> > the file data, then turned it back on and it only takes about
> > 3 seconds for the entire file!  The problem is that when
> > visibility is turned off, I have this big "hole" in the middle
> > of the application (about 3/4ths of the screen) which then 
> > comes back on when it's done.
>   

>Working directly in fields is usually a couple orders of magnitude 
>slower than working in a variable (see this metaphor for lighthearted 
>explanation of why: 
><http://lists.runrev.com/pipermail/use-revolution/2005-May/057143.html>).
>
>Rather than hide the field, could you do the conversion in a variable 
>and then drop the text into the field when you're done?
>
>Or if the user needs to see the progress while it's happening, maybe you 
>could dump the variable into the field after every hundredth record or so.
>
>Lots of ways to do this, but the key to all of them is to move the work 
>from the field to a variable.
>

I guess the other option I have if I want to "simulate" the field being updated on the fly would be to figure out how many lines of text are displayed, update the TEXT FIELD that many lines only (while creating a variable with the "real" data in it), then when it's done, putting the variable into the text field all at once.
-- Richard Gaskin Managing Editor, revJournal 
_______________________________________________________ Rev tips, 
tutorials and more: http://www.revJournal.com -




More information about the use-livecode mailing list