Skip to content

Instantly share code, notes, and snippets.

@tpitale
Last active December 17, 2015 02:39
Show Gist options
  • Select an option

  • Save tpitale/5537466 to your computer and use it in GitHub Desktop.

Select an option

Save tpitale/5537466 to your computer and use it in GitHub Desktop.
The bit of code in ember.js that is pausing for a good second or so.
RunLoop.prototype = {
/**
@method end
*/
end: function() {
this.flush();
},
// …
Ember.tryFinally = function(tryable, finalizer, binding) {
var result, finalResult;
binding = binding || this;
try {
result = tryable.call(binding);
} finally {
finalResult = finalizer.call(binding); // THIS LINE PAUSES, SOMETIMES
}
return (finalResult === undefined) ? result : finalResult;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment