PHP has a sleep() function, but JavaScript doesn’t. Well, this is because it’s useless, you might say, and you’ll be right. But for simulating heavy processing and for misc performance measurements, it could be useful. So here’s how you can go about creating a sleep() in JavaScript. The code function sleep(milliseconds) { var start = […]
Archive for the 'performance' Category
20 new performance best practices
Mar 18th, 2008The slides from my PHP Quebec presentation in Montreal are up on slideshare. Roughly the content is divided into: a quick review/update to Yahoo’s existing 14 best practices for improving performance, and a discussion of the 20 new ones Enjoy responsibly and don’t hesitate to send back questions and comments. And how about this slide […]
Simultaneuos HTTP requests in PHP with cURL
Feb 19th, 2008The basic idea of a Web 2.0-style “mashup” is that you consume data from several services, often from different providers and combine them in interesting ways. This means you often need to do more than one HTTP request to a service or services. In PHP if you use something like file_get_contents() this means all the […]
7 habits for a highly effective performance optimization effort
Jan 7th, 2008… by Tenni Theurer. Here’s the piece on YDN (Yahoo Developer Network). Read and adopt. 😀
Quick CSSSprites.com stats
Sep 12th, 2007Just deleted about 3 gigs of files uploaded to csssprites.com because I’m running out of disk space. I keep the .html results though, just for stats purposes. So ls | wc -l says that there are 3170 files meaning over 3000 sprite images were produced already, nice. The tool is very primitive, I admit, its […]
12 questions to ask your host-to-be
Sep 1st, 2007I was working on an article discussing how to implement Yahoo’s 13 rules for front-end performance on a shared host, I hope the article will be out soon. Anyway I have access to accounts at a few hosts – icdsoft.com, site5.com, dreamhost.com, so I was trying out the stuff I wrote in the article and […]
YSlow performance extension for Firebug
Jul 25th, 2007Steve Souders, performance architect at Yahoo, announced today the public release of YSlow. What’s YSlow? It’s an extension to Firebug (yes, correct, Firebug, not Firefox) that helps with performance optimization efforts. It scores your page on the scale A to F, based on compliance with Yahoo’s performance rules. It’s a tool that has been used […]
phpBB front-end optimization – 1 hour workshop
Jul 13th, 2007Let’s go ahead and optimize our phpBB installation for front-end performance. I’ll follow Yahoo’s 14 optimization rules, but only implement the ones that apply for phpBB. During this short workshop there will be no changes to the phpBB code, we’ll create a new template instead, so that in case something bad happens, your board will […]
CSS Sprites generation tool
Jun 27th, 2007Here’s my last weekend’s project – a web-based tool to generate images for CSS sprites: http://www.csssprites.com. Cool domain name, eh? I couldn’t believe it was not taken. CSS Spr…what? This is a simple technique used for page load performance purposes. Since HTTP requests are the most expensive thing you can do in regards to front-end […]
Smart browsers don’t download unneeded images
Jun 23rd, 2007We ofter complain about browsers, browser inconsistencies, quirks, hickups, the list goes on. Let’s say something nice to them, and hope for good karma 🙂 It happens as your web app grows in size and team members that some parts of the stylesheets become obsolete, no one remembers why they were there in the first […]
Delay loading your print CSS
Jun 17th, 2007So you have two stylesheets on your page, like this: <link type="text/css" rel="stylesheet" href="screen.css" media="screen" /> <link type="text/css" rel="stylesheet" href="print.css" media="print" /> The first one is used to render the page on screen, the other one is used for printing the page and print previewing it. Good. The thing is, when it comes to performance, […]




