{"action":"created","issue":{"url":"https://api.github.com/repos/petkaantonov/bluebird/issues/506","labels_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/506/labels{/name}","comments_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/506/comments","events_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/506/events","html_url":"https://github.com/petkaantonov/bluebird/issues/506","id":58466052,"number":506,"title":"AFunction.prototype should be set in a variable for minification","user":{"login":"marchant","id":367788,"avatar_url":"https://avatars.githubusercontent.com/u/367788?v=3","gravatar_id":"","url":"https://api.github.com/users/marchant","html_url":"https://github.com/marchant","followers_url":"https://api.github.com/users/marchant/followers","following_url":"https://api.github.com/users/marchant/following{/other_user}","gists_url":"https://api.github.com/users/marchant/gists{/gist_id}","starred_url":"https://api.github.com/users/marchant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marchant/subscriptions","organizations_url":"https://api.github.com/users/marchant/orgs","repos_url":"https://api.github.com/users/marchant/repos","events_url":"https://api.github.com/users/marchant/events{/privacy}","received_events_url":"https://api.github.com/users/marchant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-21T17:01:47Z","updated_at":"2015-02-21T17:35:29Z","closed_at":null,"body":"The pattern used in the code today is to have AFunction.prototype.method = ... .Not only this is potentially slowing parsing as prototype is accessed over and over, that pattern works against minification.\r\nfunction Promise(resolver) {...}\r\nvar PromiseP = Promise.prototype;\r\nor simply \r\nvar prototype =  Promise.prototype;\r\n\r\nthen prototype.toString = function () {...}; instead of Promise.prototype.toString = function () {...} would minify much better.\r\n\r\nDoing this throughout bluebird could lead to serious gains "},"comment":{"url":"https://api.github.com/repos/petkaantonov/bluebird/issues/comments/75382453","html_url":"https://github.com/petkaantonov/bluebird/issues/506#issuecomment-75382453","issue_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/506","id":75382453,"user":{"login":"benjamingr","id":1315533,"avatar_url":"https://avatars.githubusercontent.com/u/1315533?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamingr","html_url":"https://github.com/benjamingr","followers_url":"https://api.github.com/users/benjamingr/followers","following_url":"https://api.github.com/users/benjamingr/following{/other_user}","gists_url":"https://api.github.com/users/benjamingr/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamingr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamingr/subscriptions","organizations_url":"https://api.github.com/users/benjamingr/orgs","repos_url":"https://api.github.com/users/benjamingr/repos","events_url":"https://api.github.com/users/benjamingr/events{/privacy}","received_events_url":"https://api.github.com/users/benjamingr/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T17:35:29Z","updated_at":"2015-02-21T17:35:29Z","body":"Yeah the benefit from prototype lookup during the initial parsing is completely negligible and sounds like a wrong place to optimize. "}}