[thelist] Re: VBScript strings (was Re: DBA survey)
Melissa Phelps Firestone
liss at frameshift.com
Fri Mar 9 14:31:18 CST 2001
On 3/9/01 3:09 PM, "Warden, Matt" <mwarden at odyssey-design.com> wrote:
> response.write "a" & "b" & "c"
>
> response.write "a"
> response.write "b"
> response.write "c"
>
> Now, I'm not going to claim to have personally done speed tests on this, but I
> would be quite surprised if the first one is slower than the second. However,
> I do agree that a performance hit is incurred when the entire page is put into
> a variable and then printed out.
Matt, I agree with you on this, but I think the issue here is that you're
not really concatenating your strings, you're just sequentially sending them
through the response.write method.
What I think the original message was comparing was this:
a = "some text"
b = "some other text"
x = a & b
x = x & "and more text"
Response.write x
...as compared to your options above. Creating a new string variable and
concatenating strings/variables/etc. within it for the purpose of writing it
with one variable. I believe that this last method (which I've seen a lot
of) would be much slower than either of your options above.
--Liss
More information about the thelist
mailing list