473,803 Members | 2,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q about ASP speeds

I just converted lots of ASP to ASP.NET (using ASP2ASPX) and noticed a
drop in rendering speed. For example, one ASP page takes 0.0313s to be
generated while the ASP.NET version takes 0.4842s. Granted they are
both fast but the ASP speeds makes me think ASP object caching is
better/faster (as the SQL is the exactly the same)

Either that or I don't have something setup correctly (yet). ASP
pages use:

Response.Expire s = -1
Response.Expire sAbsolute = strDatabaseTime - 2
Response.AddHea der "pragma","n o-cache"
Response.AddHea der "cache-control","priva te"
Response.CacheC ontrol = "No-Store"

for caching while the ASP.NET pages use:

Response.Expire s = CInt(- 1)
Response.AddHea der("pragma", "no-cache")
Response.AddHea der("cache-control", "private")

So both should be re-rendered every hit. Do you have any suggestions
where I could start looking or good tools for profiling the diffs?

Thank you,
Michael

Sep 6 '06 #1
4 1279
Have you tried disabling the ViewState? If you're converting from
traditional ASP to ASP.NET then its highly unlikely that you have any
need for the ViewState.
I *never* enable ViewState unless absolutely necessary (usually due to
3rd party controls).

Add the following setting to your page heading on the client side or
set it using the properties for the page:

EnableViewState ="False"

m

mp****@htxml.co m wrote:
I just converted lots of ASP to ASP.NET (using ASP2ASPX) and noticed a
drop in rendering speed. For example, one ASP page takes 0.0313s to be
generated while the ASP.NET version takes 0.4842s. Granted they are
both fast but the ASP speeds makes me think ASP object caching is
better/faster (as the SQL is the exactly the same)

Either that or I don't have something setup correctly (yet). ASP
pages use:

Response.Expire s = -1
Response.Expire sAbsolute = strDatabaseTime - 2
Response.AddHea der "pragma","n o-cache"
Response.AddHea der "cache-control","priva te"
Response.CacheC ontrol = "No-Store"

for caching while the ASP.NET pages use:

Response.Expire s = CInt(- 1)
Response.AddHea der("pragma", "no-cache")
Response.AddHea der("cache-control", "private")

So both should be re-rendered every hit. Do you have any suggestions
where I could start looking or good tools for profiling the diffs?

Thank you,
Michael
Sep 6 '06 #2
There is no question that ASP.NET pages have the capabilities to render and
process MUCH faster than "Classic ASP" page BUT these performance
improvements do not come out of the box, you must understand several ASP.NET
topics and use them in conjunction with each other to get maximum
performance. Here are a few topics to look into:

1. All the server-side code you write in .NET is compiled code vs. the
interpreted code of Classic ASP. Compiled code executes faster than
interpreted code, but in ASP.NET, the first caller of a page will experience
a performance DELAY as the .NET code gets compiled by the Just In Time
compiler. To avoid this delay, you can pre-JIT your code using the
"NGen.exe" tool.

2. Since "pragma", "no-cache" is not always honored by clients and
"cache-control","priva te" only works in SOME proxy server environments, they
are not really a true test of performance. ASP.NET introduces a server-side
"cache" object, which (when used properly) can dramatically improve
performance. There is also an OutputCache that allows for entire pages or
fragments of pages to be cached.

3. Classic ASP provided native objects such as Request, Response, Server,
Session, Application & Error. In .NET, there are over 10,000 native objects
at your disposal. Learning about the Framework Class Library, namespaces
and assemblies will help you find the right object for the right job.

4. Because so much is new and different from Classic ASP, yet some of your
Classic ASP code (and VBScript code) can be ported to ASP.NET and VB.NET,
newcomers to ASP.NET and VB.NET tend to stick with what they know, rather
than take the time to learn the new ways of ASP.NET and VB.NET. It does
take time but, for example, I think it's been about 4 years since I wrote:
Response.anythi ng. Sure, I could still use the Response object, but .NET
provides so many other (and better) mechanisms for rendering to the client,
that there's no need.

The bottom line is that it is completely normal to look at Classic ASP and
ASP.NET and not see any improvement using ASP.NET, but that is simply
because there is much to know about it and when used properly, ASP.NET blows
Classic ASP away every time.

Good luck!

-Scott

<mp****@htxml.c omwrote in message
news:11******** *************@i 42g2000cwa.goog legroups.com...
>I just converted lots of ASP to ASP.NET (using ASP2ASPX) and noticed a
drop in rendering speed. For example, one ASP page takes 0.0313s to be
generated while the ASP.NET version takes 0.4842s. Granted they are
both fast but the ASP speeds makes me think ASP object caching is
better/faster (as the SQL is the exactly the same)

Either that or I don't have something setup correctly (yet). ASP
pages use:

Response.Expire s = -1
Response.Expire sAbsolute = strDatabaseTime - 2
Response.AddHea der "pragma","n o-cache"
Response.AddHea der "cache-control","priva te"
Response.CacheC ontrol = "No-Store"

for caching while the ASP.NET pages use:

Response.Expire s = CInt(- 1)
Response.AddHea der("pragma", "no-cache")
Response.AddHea der("cache-control", "private")

So both should be re-rendered every hit. Do you have any suggestions
where I could start looking or good tools for profiling the diffs?

Thank you,
Michael

Sep 6 '06 #3
Thank you for the suggestions but using:

<%@ Page language = "VB" Explicit="True" EnableViewState ="False" %>

didn't speed things up at all..

ms*****@hotmail .com wrote:
Have you tried disabling the ViewState? If you're converting from
traditional ASP to ASP.NET then its highly unlikely that you have any
need for the ViewState.
I *never* enable ViewState unless absolutely necessary (usually due to
3rd party controls).

Add the following setting to your page heading on the client side or
set it using the properties for the page:

EnableViewState ="False"

m
Sep 6 '06 #4
1. All the server-side code you write in .NET is compiled code vs. the
interpreted code of Classic ASP. Compiled code executes faster than
interpreted code, but in ASP.NET, the first caller of a page will experience
a performance DELAY as the .NET code gets compiled by the Just In Time
compiler. To avoid this delay, you can pre-JIT your code using the
"NGen.exe" tool.
The load times I mentioned doesn't pertain to first-time hits as the
times are the same on subsequent hits. Still, thanks for the NGen.exe
tip!
2. Since "pragma", "no-cache" is not always honored by clients and
"cache-control","priva te" only works in SOME proxy server environments, they
are not really a true test of performance. ASP.NET introduces a server-side
"cache" object, which (when used properly) can dramatically improve
performance. There is also an OutputCache that allows for entire pages or
fragments of pages to be cached.
I'll look into this.
3. Classic ASP provided native objects such as Request, Response, Server,
Session, Application & Error. In .NET, there are over 10,000 native objects
at your disposal. Learning about the Framework Class Library, namespaces
and assemblies will help you find the right object for the right job.
We are using much of the same code (want to keep it as close as
possible for this first round since I'm dealing with 6 million lines of
ASP). We will definitely explore the .NET libraries (including third
parties such as NHibernate, dotLucene, etc.
4. Because so much is new and different from Classic ASP, yet some of your
Classic ASP code (and VBScript code) can be ported to ASP.NET and VB.NET,
newcomers to ASP.NET and VB.NET tend to stick with what they know, rather
than take the time to learn the new ways of ASP.NET and VB.NET. It does
take time but, for example, I think it's been about 4 years since I wrote:
Response.anythi ng. Sure, I could still use the Response object, but .NET
provides so many other (and better) mechanisms for rendering to the client,
that there's no need.
This will be the challenge, <ASP:Repeaterse ems to look very useful
instead of dynamically including code chunks within a VBScript loop
(yuck).
The bottom line is that it is completely normal to look at Classic ASP and
ASP.NET and not see any improvement using ASP.NET, but that is simply
because there is much to know about it and when used properly, ASP.NET blows
Classic ASP away every time.
I do hope so -- it took a month to do the conversion and it will
probably take a year to tweak the rest.

Thank you,
Michael

Sep 6 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1093
by: Tom O'Neill | last post by:
------=_NextPart_000_055D_01C3672C.FBA9D860 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is there any difference in speed between the following select = statements? SELECT yada,yda FROM test WHERE id IN(1,2,3)=20
1
1714
by: Paul | last post by:
Hello, I know mysql update queries can only utilize one index, making them slow in some cases. My update are taking about 3 hours, joining 2 tables on their primary keys. (table sizes about 1 mil in 1 table, 2 mill in the other). My real question though is, mysql is only using about 10% of the cpu whilst running this update query (on a linux server), what can I do to
1
2400
by: Ralph Noble | last post by:
I have two avenues to access my primary SQL Server. (I work remotely using a VPN connection.) Usually, I hit the server from my local machine but I also login to a desktop machine inside the main building using a terminal ap and hit the server from that desktop. Anyway, when I import files locally using the Enterprise Manager's DTS import wizard, the process is incredibly slow. It doesn't matter if the file is stored on my local...
1
2093
by: Serdar C. | last post by:
i am trying to write a program to control upload and download speeds over specific ports like i have 128kbit download and 64kbit upload speed total.. i want to let port xxxx to use maximum amount of 32kbit upload speed at all.. i saw programs doin that (i.e overnet) how can i do that i dont know where to look for this program never found something about this at msdn..? anyone knows?
0
858
by: Brian Henry | last post by:
is there a way to get the current speed that a network interface is sending and recieveing data at that moment in VB.net? thanks
0
2562
by: Chaos | last post by:
For the Program I Am Making I Make Multiple HTTP Request to My Server. I found that using urllib2 it was pretty slow, when I activated the program and tested it it would hang from 2secs-5secs since I am doing it multiple times I wanted to speed it up by using pycurl. But I got the samething. Here is my code: import urllib import os.path import cookielib import pycurl
3
1165
by: sbowman | last post by:
I have a database that I was using for Monthly Statistics. I've recently loaded hundreds of thousands of records of historical data. Now my queries are running really slow!! Is there anything I can do?? Thanks! Shelley
3
2041
natalie99
by: natalie99 | last post by:
Hello I need a very simple question answered if anyone could please help :) After moving office locations, our shared network connection (attached to old building where employees still use the network) is running extremely slow, can anyone tell me how to disgnose the problem, and/or find out the current run speeds at the new office location? Thanks!!!!! Nat
3
2301
GaryTexmo
by: GaryTexmo | last post by:
I'm curious about XNA and drawing speeds... I'm finding I'm not getting what I would have expected. First, a little background on me. I started programming in QuickBasic and really liked the graphics library that came with it because it was very easy to work with. After rewriting the primitive functions in assembly, I found you could get very good speeds out of it... to the point where you could draw several 64000 pixel buffers to the screen,...
0
9566
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10555
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10317
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10300
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2974
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.