Archive for the 'performance' Category

Velocity countdown

Jun 8th, 2011

Let me try to set the mood for Velocity 2011 with an attempt to publish one performance-y post a day for the seven days between now and when the conference starts. #7 – Lazy HTML evaluation #6 – Preload in visual search suggestions #5 – perfplanet.com is open #4 – YSlow 2.0: the first sketches […]

 

Simple Sharding Logic

May 6th, 2011

Sharding is the technique where you split static components across multiple domains so the browser can fetch more components in parallel? (Which browser? How many components per hostname? Ask browserscope.org) So you have, say, image-a.png and image-b.png. You want to serve image-a from domain1.example.org and image-b.png from domain2.example.org The thing is you don’t want to […]

 

Audio sprites

Apr 13th, 2011

Another “brilliant” idea that I had recently – how about combining audio files into a single file to reduce HTTP requests, just like we do with CSS sprites? Then use the audio APIs to play only selected parts of the audio. Unlike pretty much all brilliant ideas I have, I decided to search for this […]

 

A rounded corner

Apr 13th, 2011

Warning: not practical blog post, don’t read, move on. So this is a post about a thought I had – creating rounded corners in IE678 by using roundness that they already have built-in, meaning the character O. But first: My opinion is that browsers that don’t support border-radius should never ever get rounded corners. Let […]

 

HTTPWatch automation with JavaScript

Apr 10th, 2011

Background HTTPWatch (automation) …with PHP (and again and again, and response) JavaScript shell scripting I gave this short presentation at the recent Yahoo FE summit’s open mic, here are the slides and some notes. Slides and screencast vid JavaScript shell scripting View more presentations from Stoyan Stefanov Screencast to see the thing in motion: Notes […]

 

YSlow/Chrome hacking

Mar 24th, 2011

If you haven’t seen it yet, YSlow for Chrome hit the streets couple of weeks ago. (And Google’s own PageSpeed did too yesterday. (And there’s now DynaTrace for Firefox. (And WebPageTest for Chrome. (What a month for x-browsering (word?) the performance tools! (And the month’s not even over yet))))) BTW, I closed all the parentheses […]

 

When is a stylesheet really loaded?

Mar 17th, 2011

Often we want to load a CSS file on-demand by inserting a link node. And we want to know when the file finished loading in order to call a callback function for example. Long story short: turns out this is harder than it should be and really unnecessary hard in Firefox. I hereby beg on […]

 

Velocity online conference March 2011

Mar 15th, 2011

Very rough notes from the event that just ended a few minutes ago ======== 1 ======== Tony Gentilcore (google) and Anderson Quach (MSFT) talked about the W3C working group and the specs for measuring performance: Navigation timing spec – HTML document: DNS, handshakes, load events Resource timing – how long JS, CSS, audio, video… take […]

 

Automating HTTPWatch with PHP #3

Mar 7th, 2011

The first part is here, the second is here. This third post is more about PHP and COM, rather than HTTPWatch or monitoring web performance, so feel free to skip if the title mislead you 🙂 Keep reading if you want to use and improve/update my HTTPWatch class in the future. The problem After running […]

 

Automating HTTPWatch with PHP #2

Mar 7th, 2011

In part 1 I demonstrated how you can use PHP to script and automate HTTPWatch. And how you can get data back, either reading the API docs or using a quick HAR hack to get a lot of data in one go. Now I want to share a little class I wrote to make all […]

 

Automating HTTPWatch with PHP

Mar 5th, 2011

HTTPWatch is a nice tool to inspect HTTP traffic in easy and convenient way and it works in both IE and FF now. Drawback – windows-only and paid. But the free version is good enough for many tasks. HTTPWatch can be automated and scripted which is pretty cool for a number of monitoring-like tasks. Their […]

 

CSS minifiers comparison

Oct 30th, 2010

Last year I compared some CSS minifiers, namely YUICompressor, CSSTidy (with “small” vs. “safe” settings), PHP PEAR’s CSS lib and Minify (detailed results). Now that I’ve done some work on the YUICompressor and since there’s a new kid on the block from Microsoft I thought I should give it another go. I only compared CSSTidy […]

 

cssmin.js in windows shell

Oct 29th, 2010

JavaScript can run virtually anywhere, including as a windows exe and the windows command line. Say you have a JavaScript function foo() function foo(input) { var output = input; // .. unicorns return output; } In order to make this a windows shell script you add at the and a way to read standard input […]

 

Preload, then execute

Oct 23rd, 2010

I talked before about using an object element to load scripts and styles without executing/applying them to the current document. And this is nice for preloading assets – faster and less error-prone than simple inclusion if the document or iframe. But what about preloading assets (scripts) and then executing them on the current page? Turns […]

 

Inline MHTML+Data URIs

Oct 3rd, 2010

MHTML and Data URIs in the same CSS file is totally doable and gives us nice support for IE6+ and all modern browsers. But the question is – what about inline styles. In other words can you have a single-request web application which bundles together markup, inline styles, inline scripts, inline images? With data URIs […]

 

The proper MHTML syntax

Oct 3rd, 2010

Reducing the number of HTTP requests is a must, sprites are cool, but a pain to maintain, so there come data URIs (for all browsers) and MHTML (IE6 and 7). I’ve talked about these things on this blog to a point where the blog comes up in top 10 results in search engines for queries […]

 

The European Tour 2010

Oct 2nd, 2010

So it’s been pretty quiet around here. I’m still alive and very much so. Just awfully busy. Bulgaria I took a long trip in Bulgaria. About 1 month and 20 days. Including the traditional around-Bulgaria let’s-get-drunk-in-different-cities-every-day tour de force with the gang. With unusual amount of guitar playing this time. Not all fun and roses, […]

 

Conditional comments block downloads

May 23rd, 2010

I came across this blog post (via @pornelski and @souders) where Markus has stumbled upon a case where an IE6-only stylesheet included with a conditional comment blocks the downloads in IE8. Whaaat? I had to dig in. To give you a summary: turned out that any conditional comment, not only for an extra CSS, will […]

 

YUI CSS min – part 3 – hacks

May 21st, 2010

The previous parts are here (building and testing) and here (what gets minified). Now let’s see how YUI CSS min handles CSS hacks. As you know CSS hacks often use errors in CSS parsers in browsers to target specific browser versions and supply additional rules to work around other issues in said browsers. That makes […]

 

YUI CSS Min – part 2

May 20th, 2010

The first part is here. It was more about building the YUICompressor, writing and running test cases. Now let’s see what the compressor does exactly to your CSS. BTW, you can play with the web UI to see for yourself how the minifier works. Stripping comments and white space This is the bare minimum a […]

 

15 minutes could save you…

May 17th, 2010

Since I have a ton of things to do, I decided it was about time to spend some time with this blog, performance optimization-wise. Not do anything special, just the bare minimum, the no-brainer, works-every-time, easy stuff. And I’m quite happy with the results. I only looked at the homepage, although the results will be […]

 

Browser sniffing with conditional comments

May 13th, 2010

Browser sniffing is bad. But sometimes unavoidable. But doing it on the server is bad, because UA string is unreliable. The solution is to use conditional comments and let IE do the work. Because you’re targeting IE most of the times anyway. In fact IE8 is a decent browser for the most practical purposes and […]

 

Preload CSS/JavaScript without execution

Apr 21st, 2010

Preloading components in advance is good for performance. There are several ways to do it. But even the cleanest solution (open up an iframe and go crazy there) comes at a price – the price of the iframe and the price of parsing and executing the preloaded CSS and JavaScript. There’s also a relatively high […]

 

IE9 and JPEG-XR: first impressions

Apr 5th, 2010

One of the new features in IE9 is the support for the JPEG-XR format, which reportedly has a better compression. Is it something we should dive into ASAP? JPEG-XR The wikipedia article is here. This format is developed and patented (red flag!) by Microsoft (yellow flag! 🙂 ), it replaces the suggested JPEG-2000 format and […]

 

Publishing 5 books this year

Apr 1st, 2010

So I’ll be publishing 5 books this year. Isn’t that incredible? Is it even possible? And good quality books at that? It’s a nice challenge (my last year’s challenge failed, I didn’t even bother to count how bad it failed). I think it’s possible, especially if you bend a little bit the meaning of “5”, […]