emberjs/ember.js — Issue #405: Performance issue in get for window.Ember
Author: jamesarosen
Created: 2012-01-16 23:46:02+00:00
State: open

`flushPendingChains` calls `get` with `"window"` and `"Ember"` quite often. Each time it returns `undefined`, but takes some time to resolve:

![](https://img.skitch.com/20120113-et86yb2mr8iw9gbgan6mt23k1g.jpg)

Using [this timing module](http://hastebin.com/vesevoluka.js), we found the following:

As-is: 999,999 iterations take 7803ms.

Adding a [quick-abort](http://hastebin.com/wokolakude.diff) for the `"window.Ember"` case: 999,999 iterations take 1130ms.