[thelist] ASP: WriteLine optimization?

Nicole P nicole at parrot.ca
Mon Apr 22 11:50:01 CDT 2002


>
> I'm pretty sure this has come up before, and if I remember correctly there
were some nice guidelines/suggestions for optimizing ASP
[fileobject.WriteLine "stuff"] lines.

If I remember correctly, the discussion had to do with string concatenation.
Should you concatenate the whole thing and then write it out? Or write it as
you go..

String concatenation is the costliest of them all, so scratch that. At the
end of the discussion, the consensus was that you were better off writing
everything into an array, and then dumping the array.

However, that discussion had to do with outputting HTML to the screen, not
writing in a file. And there was a desire to keep the html output separate
from the generating ASP code.  So, I don't know if it would apply to your
needs.  I would say that you'd be better off writing to the file in the
shortest possible time, avoiding any other work, so the file won't be opened
for a long time.  A whole bunch of WriteLine stuff would be fine if there's
no other processing being done between them.

I'm sure Anthony will correct me if I'm wrong, cause he was involved in the
previous discussion. Hi Anthony! ;-)

Nicole




More information about the thelist mailing list