diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index a09b2ff3e..3a63109b6 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -386,6 +386,8 @@ vAPI.messaging.broadcast = function(message) { // "the dreaded 'uniformly slow code' case where every function takes 1% // of CPU and you have to make one hundred separate performance optimizations // to improve performance at all" +// +// http://jsperf.com/closure-no-closure/2 var CallbackWrapper = function(port, request) { // No need to bind every single time diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index ba0ab423f..c2aef7564 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -804,6 +804,8 @@ vAPI.messaging.broadcast = function(message) { // "the dreaded 'uniformly slow code' case where every function takes 1% // of CPU and you have to make one hundred separate performance optimizations // to improve performance at all" +// +// http://jsperf.com/closure-no-closure/2 var CallbackWrapper = function(messageManager, channelName, listenerId, requestId) { this.callback = this.proxy.bind(this); // bind once