Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why is ASP so SLOW?! [modified]

Why is ASP so SLOW?! [modified]

Scheduled Pinned Locked Moved The Lounge
questionphpcsslounge
83 Posts 50 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N nalorin

    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

    K Offline
    K Offline
    KramII
    wrote on last edited by
    #32

    I am not sure that ASP is slow, but in the interests of 'debate'. ;) Because ASP runs on MS servers, and PHP runs on Linux. ;P (Runs for cover) My Blog

    KramII

    N 1 Reply Last reply
    0
    • A Anton Afanasyev

      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..

      P Offline
      P Offline
      Paul Watson
      wrote on last edited by
      #33

      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.

      1 Reply Last reply
      0
      • N nalorin

        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

        P Offline
        P Offline
        Paul Watson
        wrote on last edited by
        #34

        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.

        1 Reply Last reply
        0
        • R Robert Royall

          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:

          B Offline
          B Offline
          Bob1000
          wrote on last edited by
          #35

          Guess you are right, just replaced the hamsters with meerkats, site is now a lot more interactive :)

          1 Reply Last reply
          0
          • N nalorin

            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

            D Offline
            D Offline
            Dwayne J Baldwin
            wrote on last edited by
            #36

            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

            1 Reply Last reply
            0
            • P Paul Watson

              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.

              V Offline
              V Offline
              Vasudevan Deepak Kumar
              wrote on last edited by
              #37

              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

              1 Reply Last reply
              0
              • N nalorin

                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

                M Offline
                M Offline
                Manjit Dosanjh
                wrote on last edited by
                #38

                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."

                1 Reply Last reply
                0
                • A Anton Afanasyev

                  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..

                  M Offline
                  M Offline
                  Manjit Dosanjh
                  wrote on last edited by
                  #39

                  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."

                  1 Reply Last reply
                  0
                  • R Robert Royall

                    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:

                    W Offline
                    W Offline
                    Wambach
                    wrote on last edited by
                    #40

                    I printed this post, framed it and it now hangs proudly in my carpeted box. It is pure truth.

                    1 Reply Last reply
                    0
                    • C Christian Graus

                      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 )

                      L Offline
                      L Offline
                      Lebear 01
                      wrote on last edited by
                      #41

                      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.

                      1 Reply Last reply
                      0
                      • N nalorin

                        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

                        D Offline
                        D Offline
                        doWhileSomething
                        wrote on last edited by
                        #42

                        I think to do a comparison, you would need to set very specific methods/functions etc.. to compare against. Forum software "P" vs. forum software "A" is not a good comparison. Compare feature sets, ease of use, management behind the scenes, server platforms, hardware, network etc.. are all factors that have to be considered. I would suggest writing a few pieces of code in both languages, (*illion loops) for string concats, parsing etc.. DB calls and updates using both MSSQL and MySQL for both platforms. Put each technology/app under equal server under a load, then execute. Then you could get some idea of which is faster/slower and more reliable. I can't say if classic ASP is slower or faster compared to PHP, but I highly doubt PHP would be faster then any compiled language. Even high traffic sites that are written in PHP, or any language for that matter, usually implement a high level of caching either using a service like Akamai, or storing cache on their systems. By doing this, the pages served as basically static html/XML content, which takes no time to spit out. I've coded and used PHP, ASP and VB/C.Net. I'll admit I've coded some very ugly stuff in all of these languages, usually when I first started to pick them up, but can say from my experience, .Net has been very solid and very fast. I have three very large sites I work on/responsible for, and traffic on each is about 2 million PV's per day. Two of them are written in .Net, one is split between PHP and .Net, the reason for the split was that mission critical features and functionality that were written in PHP could not keep up with the load. Eventually, it too will be completely rewritten in .Net. My 2 cents.

                        My Personal Site

                        1 Reply Last reply
                        0
                        • A Andy Brummer

                          I've worked on some *fast* ASP.NET[^] sites, so it isn't a technological limitation. ASP.NET and PHP are targeted at two different types of developers. ASP.NET development is targeted at developers that just want to drop a bunch of controls on a form and have VS and the compiler work it's magic and poof you have a web site. They typically don't care that it takes a bunch of viewstate and extra page loads to make it happen. Plus to write fast ASP.NET code you have to limit the number of controls you use on a page, again something that goes against the form designer approach. I haven't used PHP, but I'm betting you are forced to deal with HTML and http requests more directly with less overhead. You end up having to do the same with ASP.NET if you care about performance and scalability, but it's rarely essential.

                          This blanket smells like ham

                          A Offline
                          A Offline
                          azonenberg
                          wrote on last edited by
                          #43

                          First of all, plenty of BIG site are written in PHP. Ever heard of Wikipedia? The programmer is definitely of importance - the more code bloat you have the slower things will run. I recently converted a customer's site from PostNuke (an open-source PHP CMS) to my own PHP CMS - and saw load times improve by an order of magnitude! Nuke had way more features than they needed, so it was very slow - sometimes taking over 1200 ms to respond when a link was clicked. My CMS, on the other hand, is stripped to the bare essentials - the core runtime code is a single 1200-line file. It typically responds between 120 and 200 ms. While not quite as fast as raw, unscripted HTML - about 80 ms, it is a vast improvement. (In my experiments, an empty PHP file takes 30-50 ms longer to process than an empty HTML file due to the fact that my host runs PHP as a CGI, so a separate process needs to be spawned. This means that my CMS took about 40 ms to actually run.)

                          A 1 Reply Last reply
                          0
                          • L led mike

                            Christian Graus wrote:

                            asp and aspx are two totally different things.

                            sure because remember, not matter where you go, there you are.

                            led mike

                            F Offline
                            F Offline
                            fing11
                            wrote on last edited by
                            #44

                            And when you get there, you've made it.

                            1 Reply Last reply
                            0
                            • N nalorin

                              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

                              T Offline
                              T Offline
                              Tomz_KV
                              wrote on last edited by
                              #45

                              One possibility is that if no one has been to a particular page at the site for a while, it will take time to compile.

                              TOMZ_KV

                              1 Reply Last reply
                              0
                              • N nalorin

                                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

                                G Offline
                                G Offline
                                GoodSyntax
                                wrote on last edited by
                                #46

                                As many others have already stated, it is difficult to compare ASP(X) with PHP or any other technical platform without a consistent standard. If one were able to develop a PHP and ASPX website with exactly the same architecture and running on identical hardware the ASPX variant would perform better because there is no JIT compilation (I'm assuming the ASPX website would be precompiled of course). Even this scenario is unfair because ASPX runs with IIS and PHP generally runs with Apache. In the end, the architecture of the application's code coupled with the capabilities of the hardware it is running on will determine it's overall performance potential. Add to the mix the web delivery platform (IIS, WebSphere, Apache, etc.), the database provider (SQL Server 2000/2005, MySQL, Oracle), operating system (Windows Server, Unix, Linux, Solaris) and clustering options, you can see that direct comparisons are impossible, there are simply too many variables to account for.

                                1 Reply Last reply
                                0
                                • A azonenberg

                                  First of all, plenty of BIG site are written in PHP. Ever heard of Wikipedia? The programmer is definitely of importance - the more code bloat you have the slower things will run. I recently converted a customer's site from PostNuke (an open-source PHP CMS) to my own PHP CMS - and saw load times improve by an order of magnitude! Nuke had way more features than they needed, so it was very slow - sometimes taking over 1200 ms to respond when a link was clicked. My CMS, on the other hand, is stripped to the bare essentials - the core runtime code is a single 1200-line file. It typically responds between 120 and 200 ms. While not quite as fast as raw, unscripted HTML - about 80 ms, it is a vast improvement. (In my experiments, an empty PHP file takes 30-50 ms longer to process than an empty HTML file due to the fact that my host runs PHP as a CGI, so a separate process needs to be spawned. This means that my CMS took about 40 ms to actually run.)

                                  A Offline
                                  A Offline
                                  Andy Brummer
                                  wrote on last edited by
                                  #47

                                  I never said there weren't any big PHP sites, so get that chip off your shoulder. All I said was that ASP.NET has a fast engine, but buried it under a bunch of designer crap. PHP not so much from what I understand.

                                  This blanket smells like ham

                                  D J 2 Replies Last reply
                                  0
                                  • N nalorin

                                    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

                                    M Offline
                                    M Offline
                                    MajorTom123
                                    wrote on last edited by
                                    #48

                                    nalorin, I agree with very little being said here. Especially trying to claim only large sites mostly are using ASP and J2EE. That's a crock. Also I disagree with the "experienced coders" thing. Statistics will take care of experienced coders eventually getting a shot at a lot of sites. Even if what I said is not true, then the less experienced coders will interact with the wizards online and learn the techniques. The parameters for site speed are: 1) Capitalization of the web site. More money there then they probably have the money for bandwidth and powerful computers. Also maybe, though not definitely, experienced programmers. 2) Number of coders on the project. If there is one, then that person will not have the time to fix all slowdowns caused by software. 3) Are the coders full time or doing it in their spare time. This is extremely important. The whole impetus behind open source software. If you have a lot of part time coders then things get done. 4) Traffic at the site. Mostly this impacts the Database and bandwidth numbers. The software and servers normally can handle a high load. However the retrieving of data and storing is a relation of RAM in the computer and disk speed. MySQL and PostgreSQL can and do handle high loads. Several of the gigantic sites use MySQL. 5) Volume of data on the site. More data to wade through (in the db) the slower it can become unless hardware or you break up the database and place it on different disks, etc... So answering your question, I would say your anecdotal review of sites is incomplete. I do not believe the language plays a huge part is the speed of the site. MS probably runs ASP and their site is fairly fast. The slowdowns on their site are due to volume of traffic and volume of data that they serve.

                                    1 Reply Last reply
                                    0
                                    • N nalorin

                                      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

                                      D Offline
                                      D Offline
                                      deltalmg
                                      wrote on last edited by
                                      #49

                                      I don't know Code Project seems fairly snappy ;) It is hard to compare sites. Perhaps the code quality isn't the same. Perhaps asp sites tend to use more eye candy. Perhaps it is the whole stack (asp = windows server and likely IIS, where as PHP might be on a *NIX box and Apache).

                                      1 Reply Last reply
                                      0
                                      • A Andy Brummer

                                        I never said there weren't any big PHP sites, so get that chip off your shoulder. All I said was that ASP.NET has a fast engine, but buried it under a bunch of designer crap. PHP not so much from what I understand.

                                        This blanket smells like ham

                                        D Offline
                                        D Offline
                                        destynova
                                        wrote on last edited by
                                        #50

                                        You didn't, but a few other posters earlier in the thread claimed that PHP isn't really used for large sites and is thus incomparable with ASP. Good point about the drag-n-drop 'programmers' though. It's possible that the poor design/implementation resulting from that approach is what causes the performance issues, not the underlying interpreter/compiler/server implementation.

                                        A 1 Reply Last reply
                                        0
                                        • N nalorin

                                          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

                                          M Offline
                                          M Offline
                                          Member 3806996
                                          wrote on last edited by
                                          #51

                                          One thing to consider, especially with forums is that the two leading commercial PHP forum software packages out there are very mature. Much more mature than any forum software I've seen done in classic ASP or ASP.NET.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups