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.
  • 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
      • D destynova

        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 Offline
        A Offline
        Andy Brummer
        wrote on last edited by
        #52

        Considering that when ASP.NET launched Microsoft basically said, that they optimized the product for cranking out small 200 or so user websites as quickly as possible, not the lean and mean case where performance is essential, that's likely to be the case. ;P There is a high performance web platform buried under there, you just have to jettison a bunch of crap to get down to it.

        This blanket smells like ham

        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
          droth17
          wrote on last edited by
          #53

          I think a key differentiator is the experience and knowledge level of the coder. IMHO, ASP is a an easier language to learn and use compared to php. Therefore, you have allot more entry level programmers, many of who may not have any formal training, writing an application. After all, everybody's kid can write a website right? Same thing applies to SQL Server and Oracle. SQL Server makes it so much easier to create databases, write views, etc compared to Oracle that you have a lower floor for the knowledge required to use SQL Server. The problem is just because one can create a database or a website in a doesn't mean they created a well designed and thought out application. I just find that the knowledge level of those working in php and Oracle is ofter much greater then those working in ASP(X) and SQL Server.

          K 1 Reply Last reply
          0
          • D droth17

            I think a key differentiator is the experience and knowledge level of the coder. IMHO, ASP is a an easier language to learn and use compared to php. Therefore, you have allot more entry level programmers, many of who may not have any formal training, writing an application. After all, everybody's kid can write a website right? Same thing applies to SQL Server and Oracle. SQL Server makes it so much easier to create databases, write views, etc compared to Oracle that you have a lower floor for the knowledge required to use SQL Server. The problem is just because one can create a database or a website in a doesn't mean they created a well designed and thought out application. I just find that the knowledge level of those working in php and Oracle is ofter much greater then those working in ASP(X) and SQL Server.

            K Offline
            K Offline
            Kent K
            wrote on last edited by
            #54

            Yes, agreed, and agree with others saying this and that it seems it's an issue of ASP.NET giving so much in features but you need to be mindful of the extra stuff that comes along that you should consider stripping out or tweaking. The work seems to be in paring out the bloat that is not needed. As others mentioned, the viewstate is an issue. I haven't seen mentioned the judicious use of server controls vs an html control wherein quickly grabbing a server control during development when an html one would be fine will cause now, that control to be compiled on the server even though you may never do any coding against it - it doesn't need to do be dynamic (like a label for instance). Also haven't seen mentioned the judicious use of caching by the developer where they should take into account the real need for up to the second data being presented to the user each time, from the database. For example, in a dropdown list of colors to choose, how often will that list change in the database, so why not set a long cache time on it. All in all it seems like it's due to judicious use of the developer of all the features and controls and wire ups they have at their disposal.

            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

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #55

              This is a really good question and I am disappointed that going through the threads I just find weird denials without addressing the question. ASP may or may not be slower than PHP. It is completely valid to compare them as they are both options in setting up a site, and the choice is fundamental to what kind of server you want to set up. I don't really know as I switched from asp to php a while back because of the bugginess of frontpage extensions, and the solid reliability of apache. Apache can go down and php sites can break, but it is usually understandable user error. With iis/frontpage, trying to follow the codes it would add in and debugging officially undocumented quirks drove me nuts. Apache/PHP is still at a programming language level, but it seems much more straight-forward than trying to get IIS/Frontpage to behave. In short, I don't know and I thought it was a good question. Saying you can't compare them or that it is all in the coder is being ignorant that there are differences between the two and it is good to know what performs better for what.

              D N 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

                E Offline
                E Offline
                envador
                wrote on last edited by
                #56

                The argument of a asp.net site's traffic level being inversely proportional to the site's performace (ie, the higher the traffic, the slower it 'feels') has been mentioned a few times in this thread already. ... But there's also another thing to consider -- unless you change the default setting in IIS, it will actually unload your asp.net site from the server's application pool after 'x' minutes of site inactivity. So the next time someone comes to your asp.net site, it will take a little extra time to load as it starts up the process again. Some less-frequented sites suffer from slow 1st load time because of this. Long time lurker; first post; please be kind!

                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

                  U Offline
                  U Offline
                  User 3583987
                  wrote on last edited by
                  #57

                  Your question is not interesting at all. There is more than one factor involved in a web app, other than the platform (being .NET, PHP, Java, Perl and so on). Application and database design and implementation greatly affect application performance. Furthermore, you have to look at the hardware other environmental factors. :confused:

                  L 1 Reply Last reply
                  0
                  • L Lost User

                    This is a really good question and I am disappointed that going through the threads I just find weird denials without addressing the question. ASP may or may not be slower than PHP. It is completely valid to compare them as they are both options in setting up a site, and the choice is fundamental to what kind of server you want to set up. I don't really know as I switched from asp to php a while back because of the bugginess of frontpage extensions, and the solid reliability of apache. Apache can go down and php sites can break, but it is usually understandable user error. With iis/frontpage, trying to follow the codes it would add in and debugging officially undocumented quirks drove me nuts. Apache/PHP is still at a programming language level, but it seems much more straight-forward than trying to get IIS/Frontpage to behave. In short, I don't know and I thought it was a good question. Saying you can't compare them or that it is all in the coder is being ignorant that there are differences between the two and it is good to know what performs better for what.

                    D Offline
                    D Offline
                    droth17
                    wrote on last edited by
                    #58

                    I totally disagree with you on this. The programmer ultimately has more control over how a site performs then any other factor. I've seem some very poorly designed PHP sites that were slow, and I've seen poorly designed ASP(X) sites that were slow. I've also seen some wickedly fast php and asp(x) sites that do basically the same thing as the poorly designed sites, they just do it a ton faster and more efficiently. The biggest difference is still the skill level of the programmer, not the language because they are all pretty solid right now. ASP tends to have a ton more entry level programmers, guys who come from a different background then say, Computer Programming. I happen to be one of those guys, I came from an engineering (chemical) background that used to tons of VBA work in Excel and from there transitioned into the web. Some of my first work as an ASP programmer was HORRIBLE, but remember I had no training, etc. I didn't understand the importance of things like garbage collection, caching, etc. My knowledge of DBs consisted of using access, so the concepts of configuring the indexes, etc was completely foreign to me. I don't know of a single php programmer that came from a non computer background. Sure, there are some out there, but on the norm, there are many more non-computer based asp(x) programmers as compared to php. I don't care how fast a language or server is, if the programmer doesn't have a clue and writes horrible code the application will be slow.

                    D 1 Reply Last reply
                    0
                    • E El Corazon

                      nalorin wrote:

                      I suppose the experience of the coder plays a huge part ^_^

                      it plays a HUGE part! anyone not experienced can totally screw up any and every language known to man. :-D

                      _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                      N Offline
                      N Offline
                      NimitySSJ
                      wrote on last edited by
                      #59

                      Maybe you will remember this one El Corazon, when we were discussing ridiculous code. It is the Quadrasort. This is code written on a platform that can achieve decent speed, but the design is so bad that the algorithm will be slower than the slowest scripting languages in achieving results. See it at: http://thedailywtf.com/Articles/The\_Quadrasort.aspx (hey, an ASP page, let's see how fast it loads) "anyone not experienced can totally screw up any and every language known to man" (El Corazon) This seems to support that claim, as does George Bush's use of English. ;)

                      E 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:

                        N Offline
                        N Offline
                        NimitySSJ
                        wrote on last edited by
                        #60

                        The defragmentation and garbage collection routines of such servers are a turn-off to new hires. They just can't get over the smell produced by days of work.

                        1 Reply Last reply
                        0
                        • N NimitySSJ

                          Maybe you will remember this one El Corazon, when we were discussing ridiculous code. It is the Quadrasort. This is code written on a platform that can achieve decent speed, but the design is so bad that the algorithm will be slower than the slowest scripting languages in achieving results. See it at: http://thedailywtf.com/Articles/The\_Quadrasort.aspx (hey, an ASP page, let's see how fast it loads) "anyone not experienced can totally screw up any and every language known to man" (El Corazon) This seems to support that claim, as does George Bush's use of English. ;)

                          E Offline
                          E Offline
                          El Corazon
                          wrote on last edited by
                          #61

                          NimitySSJ wrote:

                          It is the Quadrasort.

                          that mountain of smelly code is forever burned into my brain.... even the reminders don't really remind me of it anymore, it is always there churning.... repeating the mantra... "never do this.... never do this...." :-D

                          _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                          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:

                            N Offline
                            N Offline
                            nalorin
                            wrote on last edited by
                            #62

                            ROFL!

                            "Silently laughing at silly people is much more satisfying in the long run than rolling around with them in a dusty street, trying to knock out all their teeth. If nothing else, it's better on the clothes." - Belgarath (David Eddings)

                            1 Reply Last reply
                            0
                            • E Erik Funkenbusch

                              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?

                              N Offline
                              N Offline
                              nalorin
                              wrote on last edited by
                              #63

                              Erik Funkenbusch wrote:

                              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.

                              I realize this. As I've stated earlier, there were things that I didn't take into consideration (particularly hardware, and programmer experience, etc) - I do that sometimes :P

                              "Silently laughing at silly people is much more satisfying in the long run than rolling around with them in a dusty street, trying to knock out all their teeth. If nothing else, it's better on the clothes." - Belgarath (David Eddings)

                              1 Reply Last reply
                              0
                              • P Pete OHanlon

                                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.

                                My blog | My articles

                                N Offline
                                N Offline
                                nalorin
                                wrote on last edited by
                                #64

                                Pete O'Hanlon wrote:

                                Was your other parent a toaster?

                                I don't appreciate the racial slur against my Cylon mother! (If anyone's not as big of a nerd as I, Look up Battlestar Gallactica on Wikipedia, or something :D)

                                "Silently laughing at silly people is much more satisfying in the long run than rolling around with them in a dusty street, trying to knock out all their teeth. If nothing else, it's better on the clothes." - Belgarath (David Eddings)

                                P 1 Reply Last reply
                                0
                                • K KramII

                                  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 Offline
                                  N Offline
                                  nalorin
                                  wrote on last edited by
                                  #65

                                  KramII wrote:

                                  Because ASP runs on MS servers, and PHP runs on Linux. (Runs for cover)

                                  But you can run ASP on Linux servers (using open-source clones), and PHP on Winnoes, so this says nothing! If you didn't take a stab at mocking Microsoft, I'd chase you with a torch and pitchfork! :P

                                  "Silently laughing at silly people is much more satisfying in the long run than rolling around with them in a dusty street, trying to knock out all their teeth. If nothing else, it's better on the clothes." - Belgarath (David Eddings)

                                  K 1 Reply Last reply
                                  0
                                  • L Lost User

                                    This is a really good question and I am disappointed that going through the threads I just find weird denials without addressing the question. ASP may or may not be slower than PHP. It is completely valid to compare them as they are both options in setting up a site, and the choice is fundamental to what kind of server you want to set up. I don't really know as I switched from asp to php a while back because of the bugginess of frontpage extensions, and the solid reliability of apache. Apache can go down and php sites can break, but it is usually understandable user error. With iis/frontpage, trying to follow the codes it would add in and debugging officially undocumented quirks drove me nuts. Apache/PHP is still at a programming language level, but it seems much more straight-forward than trying to get IIS/Frontpage to behave. In short, I don't know and I thought it was a good question. Saying you can't compare them or that it is all in the coder is being ignorant that there are differences between the two and it is good to know what performs better for what.

                                    N Offline
                                    N Offline
                                    nalorin
                                    wrote on last edited by
                                    #66

                                    I don't think that it's "all in the coder['s ignorance]" is really what I said, though. Essentially, I meant that the experience of the coder can greatly affect the performance of a site. Someone argued against this point saying that the less experienced coders will connect with the "Wizards", and essentially learn their tricks. However true this may be, an inexperienced coder is more likely to program it how he knows first (resulting in slow page load times), then go back after he's learned better from the Gurus.

                                    "Silently laughing at silly people is much more satisfying in the long run than rolling around with them in a dusty street, trying to knock out all their teeth. If nothing else, it's better on the clothes." - Belgarath (David Eddings)

                                    L 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
                                      dev_maniac12
                                      wrote on last edited by
                                      #67

                                      I agree with what other people have said that it really depends on the application, the programmer, the db and hardware. I think if you could make an exactly equivalent app in ASPX and PHP, and run it on exactly equivalent hardware, then the ASPX would actually run faster, just because it's compiled. I'll say that ASPX sites tend to be more complex, and because of that there's more the programmer can do wrong that will make it run slower. There's part of your answer. I'll also say that one really common reason that ASPX sites run slowly is out-of-control viewstates. Something like a forum that uses a repeater could have viewstate info for every control shown on the page, and that viewstate has to get transferred over the wire in both directions. So it's just the extra bandwidth making it seem slow. (I have actually coded pages with >200KB viewstates. My bad...)

                                      L 1 Reply Last reply
                                      0
                                      • N nalorin

                                        I don't think that it's "all in the coder['s ignorance]" is really what I said, though. Essentially, I meant that the experience of the coder can greatly affect the performance of a site. Someone argued against this point saying that the less experienced coders will connect with the "Wizards", and essentially learn their tricks. However true this may be, an inexperienced coder is more likely to program it how he knows first (resulting in slow page load times), then go back after he's learned better from the Gurus.

                                        "Silently laughing at silly people is much more satisfying in the long run than rolling around with them in a dusty street, trying to knock out all their teeth. If nothing else, it's better on the clothes." - Belgarath (David Eddings)

                                        L Offline
                                        L Offline
                                        Lost User
                                        wrote on last edited by
                                        #68

                                        Yea, the wizards is why I moved from Frontpage/IIS/ASP, because it tended to want to do things in clunky ways. I spent more time wrestling with the Wizard's results or trying to emulate them with tweaks to get just what I wanted, than it would take to just create from scratch it with better understanding. I was not specifically dogging your response, it just was I was looking for some reasonable analysis of the question and I could not find any answer that addressed actual speed differences between php and asp for specific modules, scenarios, etc. The reponses seemed to hinge on implying that there was no difference, or you couldn't compare, which did not seem to make sense, since there must be some difference, even if it is situational, and since they are competing languages/platforms, there must be a rational to compare what handles what better. Thanks

                                        1 Reply Last reply
                                        0
                                        • U User 3583987

                                          Your question is not interesting at all. There is more than one factor involved in a web app, other than the platform (being .NET, PHP, Java, Perl and so on). Application and database design and implementation greatly affect application performance. Furthermore, you have to look at the hardware other environmental factors. :confused:

                                          L Offline
                                          L Offline
                                          Lost User
                                          wrote on last edited by
                                          #69

                                          This response means nothing to the actual question. In any comparison, you have to assume some reference point. If you are not interested, why would you post?

                                          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