Slashdot Mirror


Ajax Performance Analysis

IBM Developerworks' latest was submitted to us by an anonymous reader who writes "Using Firebug and YSlow, you can thoroughly analyze your Web applications to make educated changes to improve performance. This article reviews the latest tools and techniques for managing the performance of Ajax applications along the life cycle of your application, from inception through production."

5 of 36 comments (clear)

  1. Yahoo's Problems Are Not Your Problems by davecb · · Score: 2, Informative

    A good review and counter-argument is available at the "codinghorror" blog where Jeff Atwood points out the codinghorror blogYahoo's Problems Are Not Your Problems

    --dave

    --
    davecb@spamcop.net
    1. Re:Yahoo's Problems Are Not Your Problems by Bogtha · · Score: 3, Informative

      Hmm, I'm not so sure about some of that. For instance:

      Yahoo recommends turning ETags off because they cause problems on server farms due to the way they are generated with machine-specific markers. So unless you run a server farm, you should ignore this guidance. It'll only make your site perform worse because the client will have a more difficult time determining if its cache is stale or fresh. It is possible for the client to use the existing last-modified date fields to determine whether the cache is stale, but last-modified is a weak validator, whereas Entity Tag (ETag) is a strong validator. Why trade strength for weakness?

      Because "strength" isn't anything particularly important here. The difference between strong and weak validators is that a strong validator is supposed to change even if only minor alterations take place (e.g. spelling mistakes), while a weak validator can remain the same if minor changes take place.

      In practice, I've never seen anybody make a distinction like this for websites/web applications. If anybody did bother, then weak validators would be more efficient, as they would have a better cache hit ratio. For all intents and purposes, there is no difference between a strong and a weak validator. But what you are doing is computing and transmitting useless ETag headers with every single request you serve, so it is beneficial to turn them off, even if you don't have a server farm. Last-Modified is good enough for practically everybody. If Last-Modified isn't good enough for your purposes, then you don't need to be told to switch ETags back on, you know what you are doing.

      All you're really saving here is the cost of the client pinging the server for a new version and getting a 304 not modified header back in the common case that the resource hasn't changed. That's not much overhead.. unless you're Yahoo.

      Well how much overhead it is really depends on what it is you are doing. If it's expensive to figure out if the resource has changed, you don't want to incur that expense a lot, for example naïve dynamic stylesheet implementations can noticeably slow down a site. And remember, even if you have a fast server, it doesn't mean your users have a fast connection, and going back and asking the server if things have changed for a dozen resources on the page when you know for a fact you don't change them for months at a time is ridiculous.

      His basic point, that you shouldn't take Yahoo's advice as gospel is good, but you shouldn't automatically assume that efficiency is only something that benefits giants.

      --
      Bogtha Bogtha Bogtha
  2. Firebug essential; YSlow useless by hobo+sapiens · · Score: 2, Informative

    I use AJAX all the time. Firebug is an essential tool for me. It is probably one of my most important web dev tools. You can see all server requests. Even if you don't do AJAX, that is useful. Also, the inspect option on Firebug allows you to make CSS changes without committing to the server. Without Firebug, I'd never be able to have the same insight into my pages.

    YSlow is worthless for me. Where I work, I do web development on the intranet. I do not configure the servers, and don't really even have the ability to do so. On the other end, any stuff I might do on the internet will most likely be hosted by some hosting company. Many of the things that YSlow flags are server config items, not *code* items. Sure, that has its place, but if you are a web developer (not a SA) then YSlow gives you a bunch of useless info, then a low grade if your servers are configured a certain way. Ironically, it comes from Yahoo, the masters of the bloated web page. Come to think of it, I should probably get around to uninstalling it instead of just leaving it disabled.

    --
    blah blah blah
  3. Re:There's a place for innerHTML. by larry+bagina · · Score: 3, Informative

    theFont.appendChild(document.createTextNode('Hello World'));

    If it is supposed to be text, createTextNode will properly handle &, <, etc, whereas innerHTML won't.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  4. Ajax, JS and sites like Digg.com by thejynxed · · Score: 2, Informative

    Talk about making your browser crawl like a turtle, the scripts on that site time out constantly. It's even worse than Yahoo, because at least on Yahoo, the scripts never time out. I have the same issue with Reddit and other such sites. Not everyone has 10+ mbit connections running on Quad-Core machines with 4 GB of RAM. Web devs seem to forget this more than any other programmer class. Just because it runs fine on your 100+ mbit connection and Intel Mac at work, doesn't mean it runs that way anywhere else.

    Funny thing: If I totally disable JS, then the sites load up REALLY fast, I just can't do anything like reply to comments :)

    --
    @Mindless Drivel: 100% of Twitter posts ever Tweeted.