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

      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 Offline
      L Offline
      Lost User
      wrote on last edited by
      #70

      It sounds like ASP has a lot of more "cool" things added in that are potential performance pitfalls, because the understanding of their usage has not matured enough. Thanks for explaining.

      1 Reply Last reply
      0
      • D droth17

        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 Offline
        D Offline
        Dan Neely
        wrote on last edited by
        #71

        droth17 wrote:

        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.

        If you go beyond professional programmers, PHP is popular among people slapping up personal websites because it comes free with *nix web hosting and doesn't require any commercial tools to use.

        Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull

        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

          J Offline
          J Offline
          Jono Stewart
          wrote on last edited by
          #72

          Personally I don't think this is a bad question at all! ASP, I believe, appears slower because the pages are! You will find that some pages are not pre-compiled, so when you hit the web-server the compilation happens and that slows the page down, to begin with at least. Once compiled you should have a reasonably fast time browsing the site. However, anything written in .NET is very page-heavy as it adds a whole heap of Javascript and rather long id's to each element in the page (if it is an asp control.) If you want to cut that down you need to do it yourself instead of providing asp controls that really don't need to be 'runat="server".' Often a developer will just simply drag a label onto the page in design view rather than write text into it, and that just adds more overhead. Visual Studio 2008 helps with this as it is much more HTML friendly. It's not ASP that is the slow part, it is the developer generally making the page large, and people who watch all those 'how to' videos to begin their ASP.NET development without knowing about what is going on behind the scenes are probably the ones making the slow pages :P

          1 Reply Last reply
          0
          • N nalorin

            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 Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #73

            Nope - I'm a nerd. So, was she a Centurion or an Android?

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            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

              S Offline
              S Offline
              Steve Naidamast
              wrote on last edited by
              #74

              Everytime I go to a PHP site I dread the load time...

              Steve Naidamast Black Falcon Software, Inc. blackfalconsoftware@ix.netcom.com

              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

                C Offline
                C Offline
                chash360
                wrote on last edited by
                #75

                I suspect in many cases there is a round trip to Redmond and back, perhaps with DCOM..... Until they comply with the EU court order, no one will know for sure....

                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

                  C Offline
                  C Offline
                  chash360
                  wrote on last edited by
                  #76

                  If you want real speed, step back in time, to straight HTML, and perl scripting. Do not use style sheets, or ActiveX, or IIS, or any other M$ tech, and program your site exactly for what it is supposed to do and nothing more. Its not glamorous, and pretty, but it beats the pants off glamorous, glitzy websites written in anything else, as far as speed goes. As a bonus it will be hard to be hacked, not utilizing ActiveX, and other arbitrary coding schemes that can expose your file system and process space to arbitrary code. If you want pretty things with lots of advertising, expect to be slow, or need lots of hardware to compensate. Experienced programmer's know how to write optimized code, and organize through convention and dicipline, what ASP/.Net/FrontPage/IIS and the like try to enforce through language syntax, object models, templates, stylesheets, and wizards. To truly answer the question, we would need to produce a controlled experiement, developeing the same web app/site in each language, running on equivalent hardware. The code for both should be reviewed by many that it is the most efficient it can be, for the functions involved, and then start hitting it. The basic functions of this site should included all of the neccessary functions for measuring and tracking its performance, which could really be the primary function: measureing, recording, tracking, and reporting all aspects of the site performance for all users.

                  R 1 Reply Last reply
                  0
                  • C chash360

                    If you want real speed, step back in time, to straight HTML, and perl scripting. Do not use style sheets, or ActiveX, or IIS, or any other M$ tech, and program your site exactly for what it is supposed to do and nothing more. Its not glamorous, and pretty, but it beats the pants off glamorous, glitzy websites written in anything else, as far as speed goes. As a bonus it will be hard to be hacked, not utilizing ActiveX, and other arbitrary coding schemes that can expose your file system and process space to arbitrary code. If you want pretty things with lots of advertising, expect to be slow, or need lots of hardware to compensate. Experienced programmer's know how to write optimized code, and organize through convention and dicipline, what ASP/.Net/FrontPage/IIS and the like try to enforce through language syntax, object models, templates, stylesheets, and wizards. To truly answer the question, we would need to produce a controlled experiement, developeing the same web app/site in each language, running on equivalent hardware. The code for both should be reviewed by many that it is the most efficient it can be, for the functions involved, and then start hitting it. The basic functions of this site should included all of the neccessary functions for measuring and tracking its performance, which could really be the primary function: measureing, recording, tracking, and reporting all aspects of the site performance for all users.

                    R Offline
                    R Offline
                    RCoate
                    wrote on last edited by
                    #77

                    If you really want to get a halfway valid comparison between asp, asp.net, lamp and/or any other platform, get a project going where you set a common set of criteria for a site in each platform to achieve and see who can come up with the best response times. Get each site hosted on the same machine and run some tests. There are enough talented programmers here to bash something together fairly quickly, the only problem would be finding an acceptable host.

                    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
                      dmitri_sps
                      wrote on last edited by
                      #78

                      I'd put two theories. As scripting hosting is mostly cheaper, ASP sites would be owned by larger companies on larger budgets, etc., and be "heavier" on DB usage, number of classes, etc. This may explain some of the differences. On technical side, ASP (as well as Java) works differently. First of all, once the request is mapped to the ASP(x) file, the page is parsed, source code extracted, temporary source is compiled, then object structure of server controls is de-serialized from page file, etc., etc. This, by the way, would include loading all referenced classes (in .NET). The above workload is smaller and response is much faster once the data is already cached in memory; so if you are the first person to access the page in last 30 minutes, you get the slowest response: the entire site would be started. The scripting implementations, as I understand the underlying mechanics, do not have this startup overhead, so the response times would be more "uniform".

                      1 Reply Last reply
                      0
                      • N nalorin

                        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 Offline
                        K Offline
                        KramII
                        wrote on last edited by
                        #79

                        nalorin wrote:

                        But you can run ASP on Linux servers (using open-source clones), and PHP on Winnoes, so this says nothing!

                        Quite so. But it seems a shame to let a few little facts get in the way of a good ol' bun-fight. :-D

                        KramII

                        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

                          J Offline
                          J Offline
                          Jim Crafton
                          wrote on last edited by
                          #80

                          I swear to God, does no one actually read anymore? The guy who responded to you is an idiot. Sigh...

                          ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

                          A 1 Reply Last reply
                          0
                          • J Jim Crafton

                            I swear to God, does no one actually read anymore? The guy who responded to you is an idiot. Sigh...

                            ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

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

                            When will all you PHP heads get it, I'm not bashing PHP! Jebus frickin Crispies on a jet powered pogo stick. ;P


                            I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

                            J 1 Reply Last reply
                            0
                            • A Andy Brummer

                              When will all you PHP heads get it, I'm not bashing PHP! Jebus frickin Crispies on a jet powered pogo stick. ;P


                              I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

                              J Offline
                              J Offline
                              Jim Crafton
                              wrote on last edited by
                              #82

                              Dude! I was defending you! I was complaining about the guy who responded to your post :)

                              ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

                              A 1 Reply Last reply
                              0
                              • J Jim Crafton

                                Dude! I was defending you! I was complaining about the guy who responded to your post :)

                                ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

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

                                If you could be bothered to read my damn post, it'd be clear that you don't have to reply. What are you, dumber then a flat rock? I'm a doctor Jim, not a blasted librarian.

                                This blanket smells like ham

                                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