Performance Problem with large file
Richard Gaskin
ambassador at fourthworld.com
Thu Feb 22 10:51:00 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. :)
> 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.
--
Richard Gaskin Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode
mailing list