Summary: Avoid $$(".classname") on large DOMs!!! I've recently been optimising the guts out of a JS webapp I wrote, which was making IE crawl to a halt. I discovered this after introducing a stress-inducing data set. (Using Rails' fixtures makes light work of this; since the fixtures are Ruby templates just like the web templates, it's [...]
Lessons in Javascript Performance Optimisation: 90 seconds down to 3 seconds
September 26th, 2006 · 10 Comments
Tags: Links · SoftwareDev
Rails: Finding Who Called A Partial
August 16th, 2006 · 2 Comments
So you're coding a partial and you want to know which template has pulled it in. The magic word is "@first_render", which will give you something like "homepage/admin" for the homepage/admin.rhtml template. Trivial, I know, but I couldn't find any mention of it after much googling, so I decided to output self.inspect and was pleased [...]
Tags: SoftwareDev
