Will VB COM will do better than normal ASP ?
-
Hi All I have a web application which is developed by ASP and SQL I planed to optimize the asp code.... Can anybody suggest? Doing optimization on the asp file will boost the performance? Or creating VB COM will do better? Which one will be good? Note : I have done with a testing by creating COM that pulls around 100000 records from DB and display it in the Web page.... But I don't find any time difference when I ran the same with ASP file? Can anybody give me idea on this....? Regards N.Rajakumar B.E., Application Developer
-
Hi All I have a web application which is developed by ASP and SQL I planed to optimize the asp code.... Can anybody suggest? Doing optimization on the asp file will boost the performance? Or creating VB COM will do better? Which one will be good? Note : I have done with a testing by creating COM that pulls around 100000 records from DB and display it in the Web page.... But I don't find any time difference when I ran the same with ASP file? Can anybody give me idea on this....? Regards N.Rajakumar B.E., Application Developer
Rajkamal_dfine wrote:
Can anybody give me idea on this....?
You need to identify your bottlenecks. Saying, "it's slow" is meaningless - you need to identify what is slow. It may be that re-designed queries or a good caching strategy will do far more for your app than the fastest compiled code - there's just no way of knowing until you narrow down the scope. FWIW - while compiled VB can give a nice speed boost over interpreted ASP (VBS), keep in mind that ASP runs in the STA threading model, so you can find yourself just introducing another bottleneck. There are ways around this, and for some operations it makes sense even without them... it all depends on where your costs lie.
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
-
Hi All I have a web application which is developed by ASP and SQL I planed to optimize the asp code.... Can anybody suggest? Doing optimization on the asp file will boost the performance? Or creating VB COM will do better? Which one will be good? Note : I have done with a testing by creating COM that pulls around 100000 records from DB and display it in the Web page.... But I don't find any time difference when I ran the same with ASP file? Can anybody give me idea on this....? Regards N.Rajakumar B.E., Application Developer
Hi As a short answer. My experience is that when I took out some com objects out of an application and moved its logic, unchanged, in the asp code the performance was much better. Also if you have typical asp code you should take all extra <% and %> tags out of your code to boost up your performance. Typical asp source code involves html code and logic, separate it and use
Response.write "Name:"& rs("sName")
instead of%> Name: <%= rs("sName")%> ...<%
syntax. -Joi -
Hi All I have a web application which is developed by ASP and SQL I planed to optimize the asp code.... Can anybody suggest? Doing optimization on the asp file will boost the performance? Or creating VB COM will do better? Which one will be good? Note : I have done with a testing by creating COM that pulls around 100000 records from DB and display it in the Web page.... But I don't find any time difference when I ran the same with ASP file? Can anybody give me idea on this....? Regards N.Rajakumar B.E., Application Developer
The ADO ResultSet object has a GetString method that can render the entire resultset as a single string: strData = objRS.GetString( , , "#<#/td#>##<#td#>#", _ "#<#/td#>##<#/tr#>##<#tr#>##<#td nowrap#>#", "#&#nbsp;") strData = Replace(Replace(Replace(strData, "#&#", Chr(1)), "&", "&"), Chr(1), "&") strData = Replace(Replace(Replace(strData, "#<#", Chr(1)), "<", "<"), Chr(1), "<") strData = Replace(Replace(Replace(strData, "#>#", Chr(1)), ">", ">"), Chr(1), ">") strData = "" & Replace(Left(strData, Len(strData) - 15), "", "" & vbCRLF) Call Response.Write(strData) Most of the code is used to add table tags around each of the cells. We use similar code to produce quite large MS-Excel reports. Regards Andy
-
Hi As a short answer. My experience is that when I took out some com objects out of an application and moved its logic, unchanged, in the asp code the performance was much better. Also if you have typical asp code you should take all extra <% and %> tags out of your code to boost up your performance. Typical asp source code involves html code and logic, separate it and use
Response.write "Name:"& rs("sName")
instead of%> Name: <%= rs("sName")%> ...<%
syntax. -JoiJoiSteingrims wrote:
Also if you have typical asp code you should take all extra <% and %> tags out of your code to boost up your performance.
The important thing is to make sure that response buffering is enabled. With buffering turned off, you take a performance hit every time you enter and leave a <% %> tag, but with buffering enabled you don't. Actually the testing I have done shows that using <%= %> is slightly faster than concatenating strings with the & operator. The difference is quite small, though, so use the one that gives the nicest code. I always put
Response.Buffer = True
at the top of every page. It takes a fraction of a millisecond to run each time, but if someone disables buffering on the server, it keeps your pages from suddenly being incredibly slow.--- single minded; short sighted; long gone;