Sanity Check: Object Creation Performance

[Update: Seriously, go read this post by Vyacheslav Egorov @mraleph. It’s the most fantastic thing I’ve read in a long, long time!] I hear all kinds of myths and misconceptions spouted as facts regarding the performance characteristics of various object creation patterns in JavaScript. The problem is that there’s shreds of facts wrapped up in […]

Optimizing Visual Updates

I want to briefly discuss a technique for optimizing visual updates in our web applications that I think may not get enough attention. The key is understanding the requestAnimationFrame(..) utility, which is under the general umbrella of HTML5, though it’s been around for quite awhile. Animation? The name “requestAnimationFrame” (which I will henceforth refer to […]

The case against script loaders

As a quickie follow-up to yesterday’s post “LABjs: script loading the way it ‘should’ be”, I want to address some concerns that are regularly cited as weaknesses of, and arguments against, script loaders in general (not just LABjs). Prosecution This has been said many times before, by the likes of Steve Souders and other greats, […]

Obsessions: HTTP Request Reduction

TL;DR Reducing lots of HTTP requests into fewer requests is a great idea to improve front-end performance. However, the obsession with blindly reducing down to one file isn’t healthy. Having a few files (instead of many or one) will tend to give better performance, because it will allow better cache-length, more fine-grained cache-retention, and faster parallel […]

“(pre)Maturely Optimize…” revisited

I wrote an article for Script Junkie (Microsoft) awhile back, and it was just published this week: (pre)Maturely Optimize Your JavaScript. In it, I make several against-the-grain assertions, which not surprisingly have ruffled quite a few feathers. To start out with, I’m attacking head-on the prevailing “fear” around doing anything in your code that even […]

On Script Loaders

Comment Two recent projects have come out that attempt to address the “dynamic script loader” use case: HeadJS and ControlJS. Since I’m the creator of LABjs, a general, all-purpose, performance-oriented dynamic script loader that’s been around for about a year and a half now, and is well-known enough to be in use on several major […]