Hi Neil,
Redirects are essentially two hit against the Web Server, so there's almost
always a little overhead.
ASP.NET design is very sensitive to how you design your pages or
applications. It's very easy to build very bloated Web apps with ASP.NET if
you don't pay attentition to optimizing your code and deal with things like
minimizing Viewstate, taking advantage of the cache and just plain writing
good backend code. Most of the sample code that Microsoft provides will be
the exact opposite of that <g>...
One thing to remember too is that Page performance is possibly not as fast
as you might expect because there's a ton of stuff happening on the server
to provide the 'POSTback' mechanism, control assignments, event binding etc.
Certainly loads more than a hand coded PHP application. So while individual
page loads may be slower ASP.NET is designed more for scalability and
managing many requests simultaneously rather than providing the highest
performance for individual pages through the Page framework.
Also just for a point of reference: What are we talking about when you mean
slow <g>. Maybe try this site:
http://www.west-wind.com/wwstore/
and see if that seems slow.
If you want to compare apples to apples you should write HTTP handlers which
is roughly the starting point you have in PHP - if you do that you bypass
all of the page handling logic and are on the same level that most other Web
development tools start you out on.
I come from a FoxPro background where I'd written high performing Web apps.
I was also disappointed with ASP.NET at first because it apparently seemed
considerably slower. Part of it was non-optimal design as I mentioned above,
but part of it was just perception. I find that with ASP.NET I often build
way more complex pages than I did with previous tools simply because it's
possible to do so now. I also found once I stress tested the apps, although
the old app was perceived to run faster, it actually didn't scale nearly as
well under load. ASP.NET nearly tripled the load the app could handle before
breaking.
IOW, there are lots of factors that determine performance <g>...
+++ Rick ---
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog
http://www.west-wind.com/wwthreads
----------------------------------
Making waves on the Web
> -----Original Message-----
> From: padnug@xxxxxxxxxxxxxxx [mailto:padnug@xxxxxxxxxxxxxxx]
> On Behalf Of Neil Moomey
> Sent: Friday, August 05, 2005 6:04 PM
> To: padnug@xxxxxxxxxxxxxxx
> Subject: [padnug] Slow Postings
>
> Why is a hyperlink so much quicker than a form button with a redirect
> like this? Is it posting twice? I'm really not too
> impressed with the
> execution speed of ASP.NET web forms. Sometimes it's ok and
> other times it's really slow. I'm not just talking about the
> first time it's
> executed either. I come from a PHP background and I never
> had problems
> with execution speed like I've had with ASP.NET. - Neil
>
>
>
> private void ButtonSearch1_Click(object sender,
> System.EventArgs e)
>
> {
>
> Response.Redirect("QueryF1.aspx", true);
>
> }
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> <font face=arial size=-1><a
> href="http://us.ard.yahoo.com/SIG=12hruad2k/M=362335.6886445.7
839731.1510227/D=groups/S=1705007709:TM/Y=YAHOO/EXP=>
1123297068/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforg
ood.org/topics/education/digitaldivide/?>
source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low
> income neighborhoods, 84% do not own computers. At Network
> for Good, help bridge the Digital Divide!</a>.</font>
> --------------------------------------------------------------
> ------~->
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12ho3496g/M=362131.6882499.7825260.1510227/D=groups/S=1705007709:TM/Y=YAHOO/EXP=1123300026/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
|