Feeds

Google advises flushing your website

Lessons in load time

Top 5 reasons to deploy VMware with Tegile

Web 2.0 Expo Steve Souders is the sort of person who spends his Saturday afternoons measuring website load-times. "You might watch football games," he says. "I watch websites load."

After founding the Exceptional Performance Group at Yahoo! - an effort to improve website speed from the websurfer's point of view - Souders now does similar work inside the Google Chocolate Factory. And on Thursday afternoon, he trumpeted his newest load-time tricks at Tim 2.0'Reilly's Web 2.0 Expo in downtown San Francisco.

Souder's over-arching philosophy is that the best way to improve load-times is to focus on front-end performance. When the typical webpage loads, he says, between 80 and 90 per cent of the wait time occurs after the html document has already arrived.

"In that html document is a manifest where the web developer has dictated what else should be dictated in what order," he told gathered dev types this afternoon, pointing to some typical load-time stats for iGoogle.

"Only about nine per cent of the time the user waits for the page to load is spent getting that html document. The other 91 per cent is all other activity that's driven by client - other http requests have to be made, CSS has to be parsed and applied, JavaScript has to be executed, etc."

Even with a primed cache, only about 17 per cent of iGoogle's wait time is spent on html.

With his 2007 book High Performance Web Sites, Souders detailed fourteen rules for improving front-end performance - yes, it's a Tim 2.0'Reilly tome - and he's now prepping a second book that lays out a whole new bag of tricks.

One of these is best applied to those websites that belie Souder's Performance Golden Rule: sites like Facebook take an unusually long time delivering html. "A page like Facebook takes a long time to do all the database queries to find all your friends and all their comments and all the feeds and stitch everything together. You might have that page spending 30 to 50 per cent of the overall load time just getting the html document."

With such sites, Souder suggests that developers lean the "flush" function available from most popular web programming languages, including PHP, Perl, Python, and Ruby on Rails. With flush - "autoflush" in Perl and "ios.flush" in Ruby - you can start sending your html before the entire document is queued up.

"You can can get enough of the html to the browser so that the browser can parse it and start downloading other resources even though the rest of the html is still being stitched together on the back-end," Souder said. "What flush does is it says 'Whatever you have queued up, send it down to the browser right now.'"

Souders also has a new-found obsession with simplifying CSS (cascading style sheet) selectors. He urges developers to avoid universal, descendant, and tag-child selectors, while sidestepping qualifiers for ID and class selectors.

And when using CSS, he says, you should avoid the @import rule, a way of creating a style sheet within a document and then importing additional rules. If used incorrectly, as Souder says it so often is, @import is a particular drag when pages are loaded on Internet Explorer, which may delay other scripts and other style sheets and scripts until an @import style sheet is loaded in-full.

You can read all his esoteric CSS advice here (PowerPoint).

According to Googler Steve Souder, Google is the only top-ten web property that has bothered to flush its html early. But he's not one to avoid criticizing his employer. He isn't exactly pleased with the drag that Google Analytics and Google AdSense put on third-party websites across the web. But, apparently, he's "working on it." ®

Bootnote

While at Yahoo!, Souders developed a tool known as YSlow that automatically measures website load-times. You can download it here. ®

Choosing a cloud hosting partner with confidence

More from The Register

next story
Microsoft to bake Skype into IE, without plugins
Redmond thinks the Object Real-Time Communications API for WebRTC is ready to roll
Mozilla: Spidermonkey ATE Apple's JavaScriptCore, THRASHED Google V8
Moz man claims the win on rivals' own benchmarks
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
FTDI yanks chip-bricking driver from Windows Update, vows to fight on
Next driver to battle fake chips with 'non-invasive' methods
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
Ubuntu 14.10 tries pulling a Steve Ballmer on cloudy offerings
Oi, Windows, centOS and openSUSE – behave, we're all friends here
Apple's OS X Yosemite slurps UNSAVED docs into iCloud
Docs, email contacts... shhhlooop, up it goes
Was ist das? Eine neue Suse Linux Enterprise? Ausgezeichnet!
Version 12 first major-number Suse release since 2009
prev story

Whitepapers

Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Saudi Petroleum chooses Tegile storage solution
A storage solution that addresses company growth and performance for business-critical applications of caseware archive and search along with other key operational systems.
Getting ahead of the compliance curve
Learn about new services that make it easy to discover and manage certificates across the enterprise and how to get ahead of the compliance curve.