Skip to content

Instantly share code, notes, and snippets.

@yemaw
Created April 3, 2014 03:25
Show Gist options
  • Save yemaw/9947784 to your computer and use it in GitHub Desktop.
Save yemaw/9947784 to your computer and use it in GitHub Desktop.
Meteor Rendered Templates Logging with Count
if (Meteor.isClient) {
//other client side codes
function logRenders () {
_.each(Template, function (template, name) {
var oldRender = template.rendered;
var counter = 0;
template.rendered = function () {
console.log(name, "render count: ", ++counter);
oldRender && oldRender.apply(this, arguments);
};
});
}
logRenders();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment