emberjs/ember.js — pull request #3104 by eviltrout (2013-08-05 22:02:21+00:00)
Title: Optimization: Clear the meta cache without using observers.

Every `Ember.View` created creates an observer on an `element` property that contains a reference to the element in the DOM.

When changed, it calls `Ember.propertyWillChange` and `Ember.propertyDidChange` on all `childViews`.

The purpose of this seems to be to invalidate the cached `element` value in the `metaData` so that references to DOM elements are cleared.

Creating all these observers just to clear a cache seems wasteful. This PR instead directly invalidates the cached value from the `metaData`.

Here are the results from a benchmark in my ember-performance suite, rendering a list of 1000 items.

### Before Patch

![before patch](https://f.cloud.github.com/assets/17538/913542/8cdc29e8-fe1a-11e2-9515-cde6562ee511.png)

### After Patch

![after patch](https://f.cloud.github.com/assets/17538/913544/a54bb5c0-fe1a-11e2-85ca-7bcd9d010e14.png)