Performance Problem with large file
simplsol at aol.com
simplsol at aol.com
Thu Feb 22 12:29:22 EST 2007
If it is taking 3 seconds now, processing from a variable should take
(far) less than one second. If that is so, then you will not need to
worry about covering the "hole".
I do second Richard's suggestion about moving from XML; it is really
slow, takes more memory for code, takes more memory for data, etc. -
worth asking the vendor if it is necessary.
Also, are you using "repeat with" where you could be using "repeat
for"? The latter is about ten times faster.
From: len-morgan at crcom.net
To: use-revolution at lists.runrev.com
Sent: Thu, 22 Feb 2007 9:05 AM
Subject: Re: Performance Problem with large file
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:
>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 -
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
Check out the new AOL. Most comprehensive set of free safety and
security tools, free access to millions of high-quality videos from
across the web, free AOL Mail and more.
More information about the Use-livecode