{"action":"created","issue":{"url":"https://api.github.com/repos/greasemonkey/greasemonkey/issues/2243","labels_url":"https://api.github.com/repos/greasemonkey/greasemonkey/issues/2243/labels{/name}","comments_url":"https://api.github.com/repos/greasemonkey/greasemonkey/issues/2243/comments","events_url":"https://api.github.com/repos/greasemonkey/greasemonkey/issues/2243/events","html_url":"https://github.com/greasemonkey/greasemonkey/pull/2243","id":101741285,"number":2243,"title":"avoid duplication of source strings","user":{"login":"the8472","id":1065730,"avatar_url":"https://avatars.githubusercontent.com/u/1065730?v=3","gravatar_id":"","url":"https://api.github.com/users/the8472","html_url":"https://github.com/the8472","followers_url":"https://api.github.com/users/the8472/followers","following_url":"https://api.github.com/users/the8472/following{/other_user}","gists_url":"https://api.github.com/users/the8472/gists{/gist_id}","starred_url":"https://api.github.com/users/the8472/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the8472/subscriptions","organizations_url":"https://api.github.com/users/the8472/orgs","repos_url":"https://api.github.com/users/the8472/repos","events_url":"https://api.github.com/users/the8472/events{/privacy}","received_events_url":"https://api.github.com/users/the8472/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/greasemonkey/greasemonkey/milestones/66","html_url":"https://github.com/greasemonkey/greasemonkey/milestones/3.5","labels_url":"https://api.github.com/repos/greasemonkey/greasemonkey/milestones/66/labels","id":1224025,"number":66,"title":"3.5","description":"","creator":{"login":"arantius","id":84729,"avatar_url":"https://avatars.githubusercontent.com/u/84729?v=3","gravatar_id":"","url":"https://api.github.com/users/arantius","html_url":"https://github.com/arantius","followers_url":"https://api.github.com/users/arantius/followers","following_url":"https://api.github.com/users/arantius/following{/other_user}","gists_url":"https://api.github.com/users/arantius/gists{/gist_id}","starred_url":"https://api.github.com/users/arantius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arantius/subscriptions","organizations_url":"https://api.github.com/users/arantius/orgs","repos_url":"https://api.github.com/users/arantius/repos","events_url":"https://api.github.com/users/arantius/events{/privacy}","received_events_url":"https://api.github.com/users/arantius/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":0,"state":"open","created_at":"2015-07-24T13:12:32Z","updated_at":"2015-08-24T20:07:28Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-08-18T20:25:10Z","updated_at":"2015-08-25T17:15:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/greasemonkey/greasemonkey/pulls/2243","html_url":"https://github.com/greasemonkey/greasemonkey/pull/2243","diff_url":"https://github.com/greasemonkey/greasemonkey/pull/2243.diff","patch_url":"https://github.com/greasemonkey/greasemonkey/pull/2243.patch"},"body":"Currently script sources get cloned into every sandbox in which a script runs via the `GM_info` structure. Since script sources can be fairly large this results in quite some memory overhead.\r\n\r\nAdditionally in e10s the scripts are passed down via IPC as new string instances every time they're needed, thus resulting in duplication even before the `GM_info` instances are created.\r\n\r\nI've solved that by de-duping identical string instances in `IPCScript` and by installing a cross-compartment getter for the `GM_info.scriptSource` property.\r\n\r\nShould lead to significant memory reductions, especially for large scripts and/or scripts that get loaded into every tab and frame."},"comment":{"url":"https://api.github.com/repos/greasemonkey/greasemonkey/issues/comments/134674416","html_url":"https://github.com/greasemonkey/greasemonkey/pull/2243#issuecomment-134674416","issue_url":"https://api.github.com/repos/greasemonkey/greasemonkey/issues/2243","id":134674416,"user":{"login":"the8472","id":1065730,"avatar_url":"https://avatars.githubusercontent.com/u/1065730?v=3","gravatar_id":"","url":"https://api.github.com/users/the8472","html_url":"https://github.com/the8472","followers_url":"https://api.github.com/users/the8472/followers","following_url":"https://api.github.com/users/the8472/following{/other_user}","gists_url":"https://api.github.com/users/the8472/gists{/gist_id}","starred_url":"https://api.github.com/users/the8472/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the8472/subscriptions","organizations_url":"https://api.github.com/users/the8472/orgs","repos_url":"https://api.github.com/users/the8472/repos","events_url":"https://api.github.com/users/the8472/events{/privacy}","received_events_url":"https://api.github.com/users/the8472/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T17:15:48Z","updated_at":"2015-08-25T17:15:48Z","body":"further reading: https://bugzilla.mozilla.org/show_bug.cgi?id=922481"}}