Why is ASP so SLOW?! [modified]
-
I just had an interesting question. I've used many websites, being a child of the internet. And, in all my days of surfing, I've found that, in general, PHP-driven sites generally take less time to load than ASP sites. I've found that in about 4/5 cases (particularly with forums), sites that are obviously ASP-driven (you can see the .asp(x) extension in the URLs) often take several seconds longer to load than similar pages that are obviously PHP-driven. Any suggestions on why this seems to be? (I'm not saying ASP /IS/ slower... just that it /seems/ slower - my answer to my own question would be "Microsoft", which should explain everything, but I want the nitty gritty details!)
modified on Wednesday, February 27, 2008 7:33 PM
I think what you mean is "Why are asp.net sites so slow?" Just because a website may be slow doesn't mean the technology used is slow. A lot of things affect the site speed, the biggest 2 being 1) volume of HTML, images, css linkes, etc.. and 2) Complexity of the database queries, and how well they're written. In general, my experience has been that ASP.NET is significantly faster than scripted ASP or PHP, but it's also a lot more poweful. When you put power in the hands of a developer, they use that power, and before you know it they're doing 20 SQL Queries with 55 internal joins, taking 15 seconds just to execute the sql query. PHP, frankly, requires a lot more work to do complex things, so most PHP sites are not that complex. There are the few exceptions...
-- Where are we going? And why am I in this handbasket?
-
I just had an interesting question. I've used many websites, being a child of the internet. And, in all my days of surfing, I've found that, in general, PHP-driven sites generally take less time to load than ASP sites. I've found that in about 4/5 cases (particularly with forums), sites that are obviously ASP-driven (you can see the .asp(x) extension in the URLs) often take several seconds longer to load than similar pages that are obviously PHP-driven. Any suggestions on why this seems to be? (I'm not saying ASP /IS/ slower... just that it /seems/ slower - my answer to my own question would be "Microsoft", which should explain everything, but I want the nitty gritty details!)
modified on Wednesday, February 27, 2008 7:33 PM
Didn't read all replies, but from what I know...ASP.Net was/still is a horrible mistake and a freak of nature. Granted, it was a step forward from classic ASP, but with all the ViewStates and Postbacks...those didn't add much value. Quite the contrary, actually. MVC framework looks promising, and will make web development (at least on the .Net platform) easier, but until then, ASP.Net is just a pretty messed up framework, which, if you look in the sources, was clearly quite hastily written, and still is half-baked. And yeah, I know, I'll be 1'ed for this..
-
Didn't read all replies, but from what I know...ASP.Net was/still is a horrible mistake and a freak of nature. Granted, it was a step forward from classic ASP, but with all the ViewStates and Postbacks...those didn't add much value. Quite the contrary, actually. MVC framework looks promising, and will make web development (at least on the .Net platform) easier, but until then, ASP.Net is just a pretty messed up framework, which, if you look in the sources, was clearly quite hastily written, and still is half-baked. And yeah, I know, I'll be 1'ed for this..
There are way too many variables involved to have a valid discussion on this topic without some specific real world comparisons. Experience of the coder, the equipment the code is running on, the bandwidth available at the site, the network flow between you and the site, your available bandwidth, how many processes/services/pornware is running on your system, type of information that is flowing. Not to mention the FACT that HTTP was designed for moving text from one place to another and we have added all of this other payload over the years without really changing the protocol much. Having worked with several JIT languages over the years, I would put .NET at even odds against any other JIT language for similar tasks with competent programmers at the keyboard. And really, comparing Google with a world class data center with clustered servers proper load balancing etc to average joes asp site running on a single server system with txt file database does not make your point for anyone who has a clue about how things really work. And by the way, unless you specifically reference the extraneous libraries for you ASP.NET application, they are not compiled in making the bloat is the reason argument off base. Just my 2 cents
-
???
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
:(
Christian Graus wrote:
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
:sigh: what???????????
-
Because ASP.NET sites tend to push the technology harder and have more back-end processing? Let the flame war begin! :D Site speed (for large data driven sites) is usually a function of the database backend. PHP and ASP.NET will be around the same speed (slow) if the data access is terrible.
cheers, Chris Maunder
CodeProject.com : C++ MVP
Because ASP.NET sites tend to push the technology harder and have more back-end processing? Let the flame war begin! Site speed (for large data driven sites) is usually a function of the database backend. PHP and ASP.NET will be around the same speed (slow) if the data access is terrible. Tshepiso Mogoswane Jnr Developer: and what would be the best way to access data????
-
Sites implemented in .NET (and Java EE, for that matter) tend to be higher-traffic sites than the ones written in scripting languages such as PHP or Perl. The high-traffic sites that are implemented in PHP are slow during peak times, too.
Nothing personal but that is absolute rubbish.
regards, Paul Watson Ireland & South Africa
Fernando A. Gomez F. wrote:
At least he achieved immortality for a few years.
-
I just had an interesting question. I've used many websites, being a child of the internet. And, in all my days of surfing, I've found that, in general, PHP-driven sites generally take less time to load than ASP sites. I've found that in about 4/5 cases (particularly with forums), sites that are obviously ASP-driven (you can see the .asp(x) extension in the URLs) often take several seconds longer to load than similar pages that are obviously PHP-driven. Any suggestions on why this seems to be? (I'm not saying ASP /IS/ slower... just that it /seems/ slower - my answer to my own question would be "Microsoft", which should explain everything, but I want the nitty gritty details!)
modified on Wednesday, February 27, 2008 7:33 PM
A dynamic site can be "slow" if ... 1. The server is a piece of junk (Low / Slow ram, slow HDD, low CPU). 2. The servers bandwidth is low (or the HOST is not delivering what he promised ???) 3. Different OS (Windows, Linux, ... etc). 4. The server is limiting concurent connections. 5. The sites design (DB tables for that matter) is not good. 5a. Not indexed tables. 5b. MyISAM / InnoDB bad selection (for mySQL). 5c. Not needed * in SELECT statements 5d. Loading files & images from the DB (Not a bad thing though ..) ... so if someone is determined to test if PHP/ASP is better than he must first make sure that the above causes of "Slowlyness" are eliminated (or are present) for both PHP and ASP sites.
-
Christian Graus wrote:
asp and aspx are two totally different things.
sure because remember, not matter where you go, there you are.
led mike
-
I just had an interesting question. I've used many websites, being a child of the internet. And, in all my days of surfing, I've found that, in general, PHP-driven sites generally take less time to load than ASP sites. I've found that in about 4/5 cases (particularly with forums), sites that are obviously ASP-driven (you can see the .asp(x) extension in the URLs) often take several seconds longer to load than similar pages that are obviously PHP-driven. Any suggestions on why this seems to be? (I'm not saying ASP /IS/ slower... just that it /seems/ slower - my answer to my own question would be "Microsoft", which should explain everything, but I want the nitty gritty details!)
modified on Wednesday, February 27, 2008 7:33 PM
You're a child of the internet? Was it your mother or your father? Was your other parent a toaster?
Deja View - the feeling that you've seen this post before.
-
I just had an interesting question. I've used many websites, being a child of the internet. And, in all my days of surfing, I've found that, in general, PHP-driven sites generally take less time to load than ASP sites. I've found that in about 4/5 cases (particularly with forums), sites that are obviously ASP-driven (you can see the .asp(x) extension in the URLs) often take several seconds longer to load than similar pages that are obviously PHP-driven. Any suggestions on why this seems to be? (I'm not saying ASP /IS/ slower... just that it /seems/ slower - my answer to my own question would be "Microsoft", which should explain everything, but I want the nitty gritty details!)
modified on Wednesday, February 27, 2008 7:33 PM
Good question, I have developed sites in both and this is not intended as a biased statement on any platform\language. In my own experience: * PHP gives the developer a very slimmed down model which you have to build up on - this results in lots of code and a mind set where you have to build in functions etc from the outset of your page. This kind of programming model is useful for forums as the majority of the required code is function and display based stuff. * ASP (particularly .NET) gives you a fuller model where if you want a particular set of functionality at a later date you can call it up pretty easily, but it takes a lot more work to slim down the model for optimisation purposes. If you follow the MS line you look more at thread processing and hardware optimisations, but I normally find performance problems are traced back to the database used. As people have mentioned before it is often not the language or platform, but the developers who slow things up by hack coding or poor design - if you are familiar with a language you learn the optimum coding patterns I guess.
-
I just had an interesting question. I've used many websites, being a child of the internet. And, in all my days of surfing, I've found that, in general, PHP-driven sites generally take less time to load than ASP sites. I've found that in about 4/5 cases (particularly with forums), sites that are obviously ASP-driven (you can see the .asp(x) extension in the URLs) often take several seconds longer to load than similar pages that are obviously PHP-driven. Any suggestions on why this seems to be? (I'm not saying ASP /IS/ slower... just that it /seems/ slower - my answer to my own question would be "Microsoft", which should explain everything, but I want the nitty gritty details!)
modified on Wednesday, February 27, 2008 7:33 PM
-
Didn't read all replies, but from what I know...ASP.Net was/still is a horrible mistake and a freak of nature. Granted, it was a step forward from classic ASP, but with all the ViewStates and Postbacks...those didn't add much value. Quite the contrary, actually. MVC framework looks promising, and will make web development (at least on the .Net platform) easier, but until then, ASP.Net is just a pretty messed up framework, which, if you look in the sources, was clearly quite hastily written, and still is half-baked. And yeah, I know, I'll be 1'ed for this..
Got my 5. Though I will say you can write performant ASP.NET sites. Web-app performance issues are rarely down to the language/framework used. They are largely down to poorly configured servers, bad front-end code and database problems.
regards, Paul Watson Ireland & South Africa
Fernando A. Gomez F. wrote:
At least he achieved immortality for a few years.
-
I just had an interesting question. I've used many websites, being a child of the internet. And, in all my days of surfing, I've found that, in general, PHP-driven sites generally take less time to load than ASP sites. I've found that in about 4/5 cases (particularly with forums), sites that are obviously ASP-driven (you can see the .asp(x) extension in the URLs) often take several seconds longer to load than similar pages that are obviously PHP-driven. Any suggestions on why this seems to be? (I'm not saying ASP /IS/ slower... just that it /seems/ slower - my answer to my own question would be "Microsoft", which should explain everything, but I want the nitty gritty details!)
modified on Wednesday, February 27, 2008 7:33 PM
ASP.NET gives you more rope to hang yourself with but so do most modern frameworks. Saying that it is rarely the fault of the language or framework. Most commonly it is poor front-end code giving perceived slowness, poorly configured servers* and badly written database code. Databases cause a lot of issues that a bit of tweaking and refactoring can help with. * I've seen/built my fair share of websites that are slow and yet use just 1% of the available resources.
regards, Paul Watson Ireland & South Africa
Fernando A. Gomez F. wrote:
At least he achieved immortality for a few years.
-
It's because IIS is driven by hamsters, while Apache is driven by gerbils. The gerbils run slightly faster than the hamsters but they wear out more quickly. That's why Apache has so many plug-in modules - it saves the server administrator from having to replace so many gerbils all the time.
Please don't bother me... I'm hacking right now. Don't look at me like that - doesn't anybody remember what "hacking" really means? :sigh:
-
I just had an interesting question. I've used many websites, being a child of the internet. And, in all my days of surfing, I've found that, in general, PHP-driven sites generally take less time to load than ASP sites. I've found that in about 4/5 cases (particularly with forums), sites that are obviously ASP-driven (you can see the .asp(x) extension in the URLs) often take several seconds longer to load than similar pages that are obviously PHP-driven. Any suggestions on why this seems to be? (I'm not saying ASP /IS/ slower... just that it /seems/ slower - my answer to my own question would be "Microsoft", which should explain everything, but I want the nitty gritty details!)
modified on Wednesday, February 27, 2008 7:33 PM
It is very difficult to compare apples to oranges. (Did you know that if you close your eyes and plug your nose that you can’t tell the difference between raw chunks of pears, apples or potatoes?) First you must consider overall traffic. Most slow sites experience multiple orders of magnitude more visitor traffic. Then you must account for functionality including dashboards, forum post counts, display preferences, previously read tracking, post thread management etc. After that you have to take into account either managed or contributed content. Finally you can include the top website slowdown issue – advertising – especially from externally syndicated tracking sites. There are also many undesired side effects that are beyond the control of the web server. Here are two examples that come to mind… 1) On one very busy site an RSS reader of blogs became extremely slow for some unexplained reason. The top 5 displayed instantly but the top 10 took nearly 30 seconds to complete. It turns out that one blog poster had included a fancy excel spreadsheet with a huge amount of style tags in his post. Since this extra data was included in the RSS feed, it swamped the system until it fell off the top 10 list. 2) A web service offered a tip of the day and was properly designed to cache data for 24 hours. A gadget was written to request the data every 6 hours. The programmer (probably during testing) added a random dummy querystring to override the cache for the newest data. As this popular gadget was installed on more machines, the web service became flooded from repeated and unintended requests. In summary, most large websites that generate incredible amounts of traffic are usually supported by mind boggling amounts of advertising that are external to the server generating your page. Websites that may serve up similar content but do not generate as much advertising revenue appear peppier because they simply present what is available internally. The bottom line is money. Does that help answer your question?
Dwayne J. Baldwin
-
Nothing personal but that is absolute rubbish.
regards, Paul Watson Ireland & South Africa
Fernando A. Gomez F. wrote:
At least he achieved immortality for a few years.
In a way, Classic CP in ASP was blazingly fast and the newer CP has quite a lot of issues pending to be solved right? For sure, there is something somewhere latent with the compiled languages. There can not be a smoke without fire hiding.
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson -
I just had an interesting question. I've used many websites, being a child of the internet. And, in all my days of surfing, I've found that, in general, PHP-driven sites generally take less time to load than ASP sites. I've found that in about 4/5 cases (particularly with forums), sites that are obviously ASP-driven (you can see the .asp(x) extension in the URLs) often take several seconds longer to load than similar pages that are obviously PHP-driven. Any suggestions on why this seems to be? (I'm not saying ASP /IS/ slower... just that it /seems/ slower - my answer to my own question would be "Microsoft", which should explain everything, but I want the nitty gritty details!)
modified on Wednesday, February 27, 2008 7:33 PM
This is surprising as tests have shown that PHP compiled under .NET generally runs twice as fast as under Zend (http://www.codeproject.com/KB/cross-platform/phalanger-intro.aspx) There are lots of gotchas under asp.net and bad programming can contribute to slow performance. Generally ASP.NET pages with the viwstate enabled will be bigger than an equivalent page in PHP. Although the viewstate makes possible the really squiffy programming interface it needs to be used with care. So, although .NET should be faster, bad programming is probably responsible for a lot of slow sites.
"If the facts don't fit the theory, change the facts."
-
Didn't read all replies, but from what I know...ASP.Net was/still is a horrible mistake and a freak of nature. Granted, it was a step forward from classic ASP, but with all the ViewStates and Postbacks...those didn't add much value. Quite the contrary, actually. MVC framework looks promising, and will make web development (at least on the .Net platform) easier, but until then, ASP.Net is just a pretty messed up framework, which, if you look in the sources, was clearly quite hastily written, and still is half-baked. And yeah, I know, I'll be 1'ed for this..
Viewstates and postbacks are entirely within the control of the programmer. They can be controlled at Page or control level. Plus with Ajax support (and what fantastic support it is!) it is unrecognisable as the same system that you are describing. Can't agree with your comments, I'm afraid.
"If the facts don't fit the theory, change the facts."
-
It's because IIS is driven by hamsters, while Apache is driven by gerbils. The gerbils run slightly faster than the hamsters but they wear out more quickly. That's why Apache has so many plug-in modules - it saves the server administrator from having to replace so many gerbils all the time.
Please don't bother me... I'm hacking right now. Don't look at me like that - doesn't anybody remember what "hacking" really means? :sigh:
-
asp and aspx are two totally different things.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Christian Graus wrote:
asp and aspx are two totally different things.
Too true! I've developed similar applications in ASP and .Net, and I find .Net to be much quicker. Plus, you can pre-compile all of the code so that it runs even faster. ASP didn't offer that. I can't offer up anything solid when it comes to PHP vs. ASP and .Net, but I think it might be true that the PHP sites are sometimes lower traffic sites. I wonder if there's any true analysis of such things... As an aside/related item, last night I moved all of my databases on my production server to a different disk drive than the web services uses. I'm thinking that this will make things faster since each request of the server will have some activity from one drive and some from the other instead of everything having to come from one drive.