Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   concatenation v's response.write (http://www.velocityreviews.com/forums/t795942-concatenation-vs-response-write.html)

Andy 08-18-2004 07:59 PM

concatenation v's response.write
 
Hi,

I am a big fan of:

var=""
for i=0 to 100
var=var & i
next
response.write i

instead of

for i=0 to 100
response.write i
next

but I have found pages that are now advocating that using method 2 provides
better performance as the server no longer has to resize the string and add
stuff for each iteration. Then on the other hand other pages are telling me
that sometimes it's OK. Not one has said one way or the other.

Can any of you guys tell me what to do?

Cheers,
Andy.


Bob Barrows [MVP] 08-18-2004 08:19 PM

Re: concatenation v's response.write
 
Andy wrote:
> Hi,
>
> I am a big fan of:
>
> var=""
> for i=0 to 100
> var=var & i
> next
> response.write i
>
> instead of
>
> for i=0 to 100
> response.write i
> next
>
> but I have found pages that are now advocating that using method 2
> provides better performance as the server no longer has to resize the
> string and add stuff for each iteration. Then on the other hand
> other pages are telling me that sometimes it's OK. Not one has said
> one way or the other.
>
> Can any of you guys tell me what to do?
>
> Cheers,
> Andy.


Chris Hohmann just posted a discussion about this yesterday. Let's see ...
http://groups.google.com/groups?thre...TNGP11.phx.gbl

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Andy 08-18-2004 08:29 PM

Re: concatenation v's response.write
 
>> Bob Barrows wrote:
> Chris Hohmann just posted a discussion about this yesterday. Let's see ...
>

http://groups.google.com/groups?thre...TNGP11.phx.gbl


Ahhhhh! I searched this group before I posted. Wood for the trees.

Thanks for the response anyway Bob.



All times are GMT. The time now is 05:36 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.