View Full Version : API speed improvements
04-02-2012, 02:17 PM
With our last round of updates there were some significant changes made that help speed up the delivery of api results. How much of a difference are we talking about here?
Well, for the home page of theNetPool.com there are quite a few queries, most of which are trend related. This page used to take 4.5 seconds to load, which is unacceptable. We started using varnish to cache the results server side which sped it up to around 688-800 milliseconds. After the latest updates to the api, we are happily getting the same speed with NO caching as we were using the in memory varnish cache. That's an almost 400% improvement in page load with ZERO client side changes.
Enjoy and expect more to come :)
Do you mean without doing anything on our side - but, upgrade to the new API class - the speed is already 400% faster ?
04-02-2012, 03:36 PM
Right, doing nothing on your side, the client side. We didn't touch a single line of code anywhere, didn't even update to the new api class and the site saw a 400% speed improvement.
04-02-2012, 03:51 PM
I call bullshit.... *scurries off to test*
Brian, this is super fast!
04-03-2012, 03:45 AM
Wow, 4.5 seconds to load? Glad you were able to speed it up. Have you noticed a correlation between site load speed and sales?
I like how theNetPool.com had the HTML 5 shield logo as a popular brand when I went there (no result.) How did that get in there? ;)
04-03-2012, 07:52 AM
We were pulling almost every possible type of query for the api on our home and category pages. We pulled top trending brands, merchants, and products on top of our standard api calls. Now, those can be grouped together and run in parallel, on top of that, we are only returning the necessary data requested instead of a bunch of facets that you may or may not want in the response. All of this cuts out the need to do post processing on the data. We should now be able to trim off even more time on the NetPool side by optimizing the queries further. We no longer need to loop through the results to get rid of duplicates for example. That is now handled on the api side. We also no longer need to do any processing on our end in order to figure out if a product should have a price comparison button or a simple visit store button. Now we just fire the query and display the results with almost no processing on our end. I would expect to see our page loads in the 600 millisecond range once we take advantage of all of the new api features.
04-03-2012, 07:55 AM
How can "those be grouped together and run in parallel" ?
04-03-2012, 08:03 AM
Happens transparently on our end in cases where it makes sense.
04-03-2012, 08:41 AM
"our" being Prosperent or TNP? If the latter then I'd be interested to see how to get those to run in parallel
04-03-2012, 08:44 AM
04-04-2012, 08:51 AM
With regard to speed, I haven't made any changes to my memcache server setup I'm using. After I implemented it, my average response time for my site was at 1500ms. Between the 31st of March and the 2nd of April it was around double that. It's now settled to just under 2000ms but not touching the average I got (sometimes lower) before the API update.
I'm going to leave it be for another week or so and see if it improves. After which I'm dumping memcache and do no caching to see if it's improved somewhat or not at all (or worse)
Powered by vBulletin™ Version 4.0.8 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.