{"action":"opened","number":5174,"pull_request":{"url":"https://api.github.com/repos/composer/composer/pulls/5174","id":65975302,"html_url":"https://github.com/composer/composer/pull/5174","diff_url":"https://github.com/composer/composer/pull/5174.diff","patch_url":"https://github.com/composer/composer/pull/5174.patch","issue_url":"https://api.github.com/repos/composer/composer/issues/5174","number":5174,"state":"open","locked":false,"title":"Speedup autoloading on PHP 5.6 & 7.0+ using static arrays","user":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars.githubusercontent.com/u/243674?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"body":"In #5172 I tried an apcu lazy-loading proxy that raised [the following concern](https://twitter.com/lisachenko/status/719105126439497728) from @lisachenko:\r\n> on a big project usage of APC can lead to slow response time due to the memory fragmentation issue\r\n\r\nIt also raised [this comment](https://twitter.com/nikita_ppv/status/719150439065751556) from @nikic, which correlate with an other of the same kind I've got @jpauli saying also this should even work on 5.6:\r\n> Assuming the class map is a fully constructed plain array, PHP 7 opcache should store it in SHM w/o copies\r\n\r\nSo here is the patch, and [the corresponding Backfire profile comparison](https://blackfire.io/profiles/compare/991454f2-ecf4-4e44-b7f3-3c0d4def48e8/graph):\r\n![capture du 2016-04-11 12 59 22](https://cloud.githubusercontent.com/assets/243674/14425131/3cde9c9e-ffe5-11e5-9898-b81675877fcd.png)\r\n\r\nThe test script is exactly the same as in #5172: ~8300 lines in the class map amongst which ~420 are loaded.\r\nAs you can see on the above graph, PHP 7 this time, the performance increase is significant!\r\nAnd this comes without any configuration new options!\r\n\r\nPatch best viewed [ignoring white space diffs](https://github.com/composer/composer/pull/5173/files?w=1).","created_at":"2016-04-11T11:03:18Z","updated_at":"2016-04-11T11:03:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/composer/composer/pulls/5174/commits","review_comments_url":"https://api.github.com/repos/composer/composer/pulls/5174/comments","review_comment_url":"https://api.github.com/repos/composer/composer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/composer/composer/issues/5174/comments","statuses_url":"https://api.github.com/repos/composer/composer/statuses/06363d3114c91a7d7ba1216a6db4b99fe0bf9407","head":{"label":"nicolas-grekas:php7-static","ref":"php7-static","sha":"06363d3114c91a7d7ba1216a6db4b99fe0bf9407","user":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars.githubusercontent.com/u/243674?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"repo":{"id":16522834,"name":"composer","full_name":"nicolas-grekas/composer","owner":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars.githubusercontent.com/u/243674?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicolas-grekas/composer","description":"Dependency Manager for PHP","fork":true,"url":"https://api.github.com/repos/nicolas-grekas/composer","forks_url":"https://api.github.com/repos/nicolas-grekas/composer/forks","keys_url":"https://api.github.com/repos/nicolas-grekas/composer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicolas-grekas/composer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicolas-grekas/composer/teams","hooks_url":"https://api.github.com/repos/nicolas-grekas/composer/hooks","issue_events_url":"https://api.github.com/repos/nicolas-grekas/composer/issues/events{/number}","events_url":"https://api.github.com/repos/nicolas-grekas/composer/events","assignees_url":"https://api.github.com/repos/nicolas-grekas/composer/assignees{/user}","branches_url":"https://api.github.com/repos/nicolas-grekas/composer/branches{/branch}","tags_url":"https://api.github.com/repos/nicolas-grekas/composer/tags","blobs_url":"https://api.github.com/repos/nicolas-grekas/composer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicolas-grekas/composer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicolas-grekas/composer/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicolas-grekas/composer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicolas-grekas/composer/statuses/{sha}","languages_url":"https://api.github.com/repos/nicolas-grekas/composer/languages","stargazers_url":"https://api.github.com/repos/nicolas-grekas/composer/stargazers","contributors_url":"https://api.github.com/repos/nicolas-grekas/composer/contributors","subscribers_url":"https://api.github.com/repos/nicolas-grekas/composer/subscribers","subscription_url":"https://api.github.com/repos/nicolas-grekas/composer/subscription","commits_url":"https://api.github.com/repos/nicolas-grekas/composer/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicolas-grekas/composer/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicolas-grekas/composer/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicolas-grekas/composer/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicolas-grekas/composer/contents/{+path}","compare_url":"https://api.github.com/repos/nicolas-grekas/composer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicolas-grekas/composer/merges","archive_url":"https://api.github.com/repos/nicolas-grekas/composer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicolas-grekas/composer/downloads","issues_url":"https://api.github.com/repos/nicolas-grekas/composer/issues{/number}","pulls_url":"https://api.github.com/repos/nicolas-grekas/composer/pulls{/number}","milestones_url":"https://api.github.com/repos/nicolas-grekas/composer/milestones{/number}","notifications_url":"https://api.github.com/repos/nicolas-grekas/composer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicolas-grekas/composer/labels{/name}","releases_url":"https://api.github.com/repos/nicolas-grekas/composer/releases{/id}","deployments_url":"https://api.github.com/repos/nicolas-grekas/composer/deployments","created_at":"2014-02-04T19:26:50Z","updated_at":"2015-03-03T10:35:01Z","pushed_at":"2016-04-11T10:45:46Z","git_url":"git://github.com/nicolas-grekas/composer.git","ssh_url":"git@github.com:nicolas-grekas/composer.git","clone_url":"https://github.com/nicolas-grekas/composer.git","svn_url":"https://github.com/nicolas-grekas/composer","homepage":"http://getcomposer.org/","size":12173,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"composer:master","ref":"master","sha":"40c14709f79f9d7ea35ac969cfbd7f41beb525bb","user":{"login":"composer","id":837015,"avatar_url":"https://avatars.githubusercontent.com/u/837015?v=3","gravatar_id":"","url":"https://api.github.com/users/composer","html_url":"https://github.com/composer","followers_url":"https://api.github.com/users/composer/followers","following_url":"https://api.github.com/users/composer/following{/other_user}","gists_url":"https://api.github.com/users/composer/gists{/gist_id}","starred_url":"https://api.github.com/users/composer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/composer/subscriptions","organizations_url":"https://api.github.com/users/composer/orgs","repos_url":"https://api.github.com/users/composer/repos","events_url":"https://api.github.com/users/composer/events{/privacy}","received_events_url":"https://api.github.com/users/composer/received_events","type":"Organization","site_admin":false},"repo":{"id":1864363,"name":"composer","full_name":"composer/composer","owner":{"login":"composer","id":837015,"avatar_url":"https://avatars.githubusercontent.com/u/837015?v=3","gravatar_id":"","url":"https://api.github.com/users/composer","html_url":"https://github.com/composer","followers_url":"https://api.github.com/users/composer/followers","following_url":"https://api.github.com/users/composer/following{/other_user}","gists_url":"https://api.github.com/users/composer/gists{/gist_id}","starred_url":"https://api.github.com/users/composer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/composer/subscriptions","organizations_url":"https://api.github.com/users/composer/orgs","repos_url":"https://api.github.com/users/composer/repos","events_url":"https://api.github.com/users/composer/events{/privacy}","received_events_url":"https://api.github.com/users/composer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/composer/composer","description":"Dependency Manager for PHP","fork":false,"url":"https://api.github.com/repos/composer/composer","forks_url":"https://api.github.com/repos/composer/composer/forks","keys_url":"https://api.github.com/repos/composer/composer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/composer/composer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/composer/composer/teams","hooks_url":"https://api.github.com/repos/composer/composer/hooks","issue_events_url":"https://api.github.com/repos/composer/composer/issues/events{/number}","events_url":"https://api.github.com/repos/composer/composer/events","assignees_url":"https://api.github.com/repos/composer/composer/assignees{/user}","branches_url":"https://api.github.com/repos/composer/composer/branches{/branch}","tags_url":"https://api.github.com/repos/composer/composer/tags","blobs_url":"https://api.github.com/repos/composer/composer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/composer/composer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/composer/composer/git/refs{/sha}","trees_url":"https://api.github.com/repos/composer/composer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/composer/composer/statuses/{sha}","languages_url":"https://api.github.com/repos/composer/composer/languages","stargazers_url":"https://api.github.com/repos/composer/composer/stargazers","contributors_url":"https://api.github.com/repos/composer/composer/contributors","subscribers_url":"https://api.github.com/repos/composer/composer/subscribers","subscription_url":"https://api.github.com/repos/composer/composer/subscription","commits_url":"https://api.github.com/repos/composer/composer/commits{/sha}","git_commits_url":"https://api.github.com/repos/composer/composer/git/commits{/sha}","comments_url":"https://api.github.com/repos/composer/composer/comments{/number}","issue_comment_url":"https://api.github.com/repos/composer/composer/issues/comments{/number}","contents_url":"https://api.github.com/repos/composer/composer/contents/{+path}","compare_url":"https://api.github.com/repos/composer/composer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/composer/composer/merges","archive_url":"https://api.github.com/repos/composer/composer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/composer/composer/downloads","issues_url":"https://api.github.com/repos/composer/composer/issues{/number}","pulls_url":"https://api.github.com/repos/composer/composer/pulls{/number}","milestones_url":"https://api.github.com/repos/composer/composer/milestones{/number}","notifications_url":"https://api.github.com/repos/composer/composer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/composer/composer/labels{/name}","releases_url":"https://api.github.com/repos/composer/composer/releases{/id}","deployments_url":"https://api.github.com/repos/composer/composer/deployments","created_at":"2011-06-08T08:53:00Z","updated_at":"2016-04-11T10:34:53Z","pushed_at":"2016-04-10T21:24:47Z","git_url":"git://github.com/composer/composer.git","ssh_url":"git@github.com:composer/composer.git","clone_url":"https://github.com/composer/composer.git","svn_url":"https://github.com/composer/composer","homepage":"https://getcomposer.org/","size":18596,"stargazers_count":7484,"watchers_count":7484,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2054,"mirror_url":null,"open_issues_count":326,"forks":2054,"open_issues":326,"watchers":7484,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/composer/composer/pulls/5174"},"html":{"href":"https://github.com/composer/composer/pull/5174"},"issue":{"href":"https://api.github.com/repos/composer/composer/issues/5174"},"comments":{"href":"https://api.github.com/repos/composer/composer/issues/5174/comments"},"review_comments":{"href":"https://api.github.com/repos/composer/composer/pulls/5174/comments"},"review_comment":{"href":"https://api.github.com/repos/composer/composer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/composer/composer/pulls/5174/commits"},"statuses":{"href":"https://api.github.com/repos/composer/composer/statuses/06363d3114c91a7d7ba1216a6db4b99fe0bf9407"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":251,"deletions":88,"changed_files":8}}