Re: Want to reduce download time

From: Chris Barber (chris_at_blue-canoe.co.uk.NOSPAM)
Date: 04/18/04


Date: Sun, 18 Apr 2004 14:03:07 +0100

See the following short thread for a VBScript and VB class that achieves the
string builder functionality using arrays:

http://tinyurl.com/37maf

Normal concatenation using '&' is *very* slow and if you do a lot of it will
reduce your scripts to a crawl. Using the array method is approx. 100 times
faster for normal usage and has a linear response time (concatenation
degrades dramatically as the string grows).

Hope this helps.

Chris.

"Manisha" <anonymous@discussions.microsoft.com> wrote in message
news:680EC2A9-ED64-49B2-9E87-9E330213F46E@microsoft.com...
When I mean to say big means lots of Data is being pulled from database and
client wants to represent it in a tabular format (Day wise for whole 30
days). ok some more info which I got ...

client has given me one script in VB. He said that in one of their some
previous project (which was in VB) also they faced the same problem and they
said the perfirmance was increased after using this new code.

I went through it, what they are doing is making use of Dictionary objects
in together with normal Array (this array is concate of all o/p from
Dictionary object), checking the UBound of this array if exceeds then Redim
new additional 50. Something like this....Dictionary objects are used for
HTML tags such as <table><tr><td>...putting each like in Dictionary.

I need to understand what exact effect this might have on speed ? Is it
because they are not using normal arrays and Dictionary objects are faster ?
But if I make use of direct loops inside ASP pages without using arrays then
what will happen - whether this will be more faster?

regards
Manisha



Relevant Pages

  • Re: Does VBscript support " & _" for long strings?
    ... With 1000 concatenations, the concatenation operator takes over 200 times longer than Join/Array. ... to an array element. ... Assigning a large string to an element in an array apparently is slightly faster than creating the same array using the Array function, but not so much that Array could be making superfluous copies of the string. ... Dim start, finish, i, total ...
    (microsoft.public.scripting.vbscript)
  • How to concatenate nested arrays of strings
    ... I'm writing perl cgi and I like to buffer my output in an array of strings. ... Is there a more compact way of performing this nested concatenation? ... concatenates the elements first argument. ...
    (perl.beginners)
  • Re: Windows gfortran binaries
    ... the concatenation here is an ... concatenate the elements of the array together. ... I was aware of vector subscripts, but conflated it with a recent ... Ken dot And dot Ann ...
    (comp.lang.fortran)
  • Re: Windows gfortran binaries
    ... "vector subscript", a very useful feature introduced in Fortran 90. ... the concatenation here is an ... concatenate the elements of the array together. ...
    (comp.lang.fortran)
  • Re: Want to reduce download time
    ... client has given me one script in VB. ... what they are doing is making use of Dictionary objects ... in together with normal Array (this array is concate of all o/p from ... demand if the report is actually that large. ...
    (microsoft.public.scripting.vbscript)