ASP tips to improve performance and style
1) Releasing of resources
ADO connections and recordsets are
the prime candidates for this type of optimization. After the operation
of the recordset , release it immediately , no need of waiting until
the end of the page. Set recordset variable to nothing after closing
it. Release any command and connection objects.
2) Use option Explicit
This forces to declare all variables
before its use. Declared variables are faster than undeclared variables.
This is because , undeclared by name by the scripting runtime references
, every time they are used Declared variables on the other hand
, are assigned an ordinal either compile time or runtime. Ordinal
references are faster than name reference
3) Batch inline scripts and response.write
statements.
4) Use recordset's ordinal reference
rather than rs("fieldname") or rs.fields("fieldname")
5) When displaying database results
, the table tag must be closed before the next scan
More Links
www.asptoday.com
www.15seconds.com
www.4guysfromrolla.com
www.msdn.microsoft.com
www.learnasp.com
www.asplists.com
www.aspin.com
www.ultimateasp.com
|