[thelist] Optimising ASP/HTML

Vlad Alexander (XStandard) vlad.alexander at xstandard.com
Wed Dec 15 09:50:37 CST 2004


Hi Andreas,

Concatenating strings like "output += source;" is a very resource intesive 
process. If you did something like this, you would find that performance 
would be similar to just doing Response.Write line by line:

Dim objDict, i
Set objDict = Server.CreateObject("Scripting.Dictionary")
For i = 1 to 100
    objDict.Add objDict.Count, "Hello World"
Next
Response.Write Join(objDict.Items, "")

Better yet, you can use our Buffer component:
http://xstandard.com/page.asp?p=31E7497C-15A9-4FEA-8950-07935962E847

Regards,
-Vlad
http://xstandard.com
Standards-based XHTML WYSIWYG editor

----- Original Message ----- 
From: "Andreas Wahlin" <Andreas.Wahlin at ufl.gu.se>
To: <thelist at lists.evolt.org>
Sent: Wednesday, December 15, 2004 5:24 AM
Subject: [thelist] Optimising ASP/HTML


I've just performed some extremely unscientific tests. I was wondering
how I could optimise output and rendering performance. The test was
conducted with asp and IE (because most people use that, I also did
quick checks in FF)

First I thought that it would be faster to assemble all output into one
variable and ther print it to the page

For (var i = 0; i < 100; i++)
output += source;
Response.Write(output);

Rather than

For (var i = 0; i < 100; i++)
Response.Write(output);


This however did not seem to be the case.
Then I went ahead and checked rendering time of pure text vs markeup,
not surprisingly markup was slower to render, thus comparing
Sample text
Vs
<b>text</b>

The "Sample text" rendered faster. Then I thought that advanced markup,
like tables, wolud render slow than more direct, like lists. (an update
from table design to more correct/semantic/standard/cool factor divs and
list design) but this did not seem to be the case (except of course that
a list design contains less text than a table design, if you were to
count the number of characters it needs) I did not work with that
complex a table either ...

Any comments?


Andreas Wahlin
projektanställd UFL, Göteborgs universitet
031-773 5531
Elsa; Elektronisk LärarStudent Administration
http://www.ufl.gu.se/elsa.asp

Omnia Mutantur Nihil Interit
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !




More information about the thelist mailing list