filamentgroup/jQuery-Equal-Heights — pull request #11 by JangoSteve (2013-05-15 03:38:17+00:00)
Title: Improve performance by eliminating repeated instantiation of jquery objects

There are repeated calls to `$(this)` and `$(this).children()` throughout the plugin. Every time `$(this)` is called, jQuery instantiates another jQuery object wrapped around `this`, and every time `$(this).children()` is called, it instantiates another jQuery object around `this` and re-runs the sizzle selectors to find the children and instantiates new objects around the children set.

This all results in a lot of wasted memory, especially for a large or complex DOM or lots of rows where this plugin is being called. This can be helped by caching the objects into a variable the first time and then just referencing the variable.

See [this jsPerf](http://jsperf.com/caching-jquery-objects-perf) for benchmarks, and [this is a good talk](http://addyosmani.com/blog/jquery-performance-tips-2011/) as well.