On 11/17/2012 09:14 AM, Ángel González wrote:
> On 17/11/12 17:24, Rasmus Lerdorf wrote:
>> Being able to fire off your SQL query at the top of a page and then
>> instead of waiting around for the result continue building the page
>> until you get to the point where you need the DB result.
> Do you really expend that much time building your html that it makes a
> difference?

It depends on your scale of course. If you are big enough being able to
shave off 10ms is a big deal. At Yahoo, for example, they have an async
ad serving platform. At the top of a page they will fire off an async
query containing a page id, the user id of the current user viewing the
page and the number of ads wanted, then they will continue rendering the
page until they get to the spot on the page where they need to place an
ad. At that point there is a blocking call to fetch the ad which by then
is hopefully ready to go. Matching an ad to a user takes a lot of
backend processing, so you don't really want to block your frontend web
servers too long waiting on those. It improves latency and server
efficiency as well. If you have more frontend web serving processes
sitting around blocked waiting on external data you will need more
frontend web servers.

But yes, you are right, for your weekend warrior Wordpress blog, those
10ms makes no difference.

-Rasmus


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to