OpenX Blog

How I sped up page load times by 10x

Tags: OpenX
by Oliver George on September 23rd, 2008

Erik Geurts has posted about how he reduced his client’s page load time using the new single page call ad tag.

“Using the newest version of OpenX, I was able to speed up a client’s website by a factor of 10.”

Single page call is a new ad tag we introduced in OpenX 2.6. It’s designed to reduce the number of requests each web page puts on your ad server which has the happy side effect of reducing the total load on your ad server. Overall, it can make a huge difference to the performance of your website.

Erik’s client made extensive use of the ad server to display and track ads to his website sponsors. This required many individual calls to the server which can slow down page loads so moving to the single page call ad tag made a big difference.

“My client’s blog, funded primarily by sponsors, has 35 zones on every page, and this made the pages load rather slowly. Single page call was designed to remedy this, and we were eager to find out how much faster the site would be after this change.”

By upgrading his client to OpenX 2.6 and updating the website to use the new single page call ad tag, Erik was able to make a significant and tangible improvement to the overall website performance.

“A load time of 12 seconds during the busy hours of the day was reduced to just under 2 seconds. And at night the site even loads in under 1 second.”

“Another advantage of single page call is that it results in a drastic reduction of the load on the ad server, since every page [load] causes only one request to the ad server.”

Find out more from Erik by reading the full article on his blog.

9 Comments »

  1. very good news :)

    Comment by Leo — September 23, 2008 @ 8:44 pm

  2. Tell us if you you would like to see a tutorial on using this technique to show a grid of ads efficiently using single page call.

    Perhaps Erik will be encouraged by the interest and write one ;-)

    cheers, Oliver

    Comment by Oliver George — September 23, 2008 @ 9:10 pm

  3. Single page call makes your site load faster…

    Using the newest version of OpenX, I was able to speed up a client’s website by a factor of 10. This tip describes how we used the singe page call feature of OpenX 2.6 to do this.

    Introducing OpenX single page call
    My client hired me to upgrade …

    Trackback by OpenX tips by Erik Geurts — September 24, 2008 @ 6:44 am

  4. Yes. I would definitely be interested in seeing a tutorial for using the single page call. :o)

    Comment by Rithish — September 24, 2008 @ 11:57 am

  5. Yes Please!

    Comment by Todd Morgan — September 25, 2008 @ 6:34 pm

  6. If we don’t take the load of the server that serves the banners (I don’t really care about the load on that server, it’s a separate machine that doesn’t serve that many banners) I found the Single page call more demanding for the end user than the iframe invocation code for each banner.

    I have iframe invocation code stored in the separate html file on the server, and after the page loads fully (with images and everything), a fetch this html file using jQuery and insert it into the banner container on the site.

    Using this method and taking into account that I have one extra http request because I load the html file with the iframe invocation code separately there are still more http requests needed to deliver the banners using Single page call than it is to deliver the banners using this html -> iframe -> banner method.

    The method I am using is described in detail on my website - http://gogs.info/2008/09/optimizing-frontend-performance-with-some-javascript-magic/ .

    So I really don’t understand how can you decrease page load times tenfold if you are actually making one or two request per banner MORE than you do with the iframe invocation code?

    If I missed something I would appreciate if you could elaborate on this delivery method in detail.

    Comment by Goran Jurić — September 29, 2008 @ 10:25 am

  7. Hm, It looks like my testing environment wasn’t so clean as I thought it was :)

    I have repeated my tests, and iframe invocation does indeed need more http requests to deliver the banner.

    I have tested with 3 banners (2 GIFs, and 1 Flash banner):

    Iframe -> 12 requests
    Single page -> 10 requests

    Comment by Goran Jurić — September 29, 2008 @ 11:38 am

  8. @Goran - SPC makes one HTTP request in the which provides the HTML for each ad on the page whereas using iframes makes one HTTP request per ad (or in your case, 2).

    The code which inserts the ad into the page (OA_show(id);) does not make an HTTP request, it simply gets the HTML already returned by the SPC request and outputs it.

    So with 20 positions on the page, SPC makes 1 HTTP request, receives the HTML for 20 ads, and outputs them as required, with iframes, each of those 20 positions makes an HTTP request and shows the selected ad.

    For each ad actually shown on the page, there will be a (non-blocking, meaning that loading the rest of the page content doesn’t hang while waiting for this response) beacon which counts the impression, and depending on the creative type, there may be an additional (non-blocking) call to retrieve the creative (e.g. the .gif or .swf media file).

    So in the scenario with 20 ads on the page, and serving only HTML/External ads:
    SPC: 1 (multi-ad) request + 20 beacon requests = 21 HTTP requests
    iframes: 20 ad requests + 20 beacon requests = 40 HTTP requests.

    The reason that iframes “feel” faster is that they are non-blocking. However the load on your adserver will be higher and you will lose the ability to use some of the ad-contextual features like companion positioning or “Don’t show this ad again on the same page”

    Comment by Chris Nutting — September 29, 2008 @ 11:50 am

  9. SPC may decrease the amount of HTTP requests per page, but what can be done on the logging front? Even if you’ve got a single page call for all banners on a page, you’re still getting an HTTP request to lg.php for each banner if you have impression logging turned on..

    Comment by Kyle — October 8, 2008 @ 6:17 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment