{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/18525","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/18525/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/18525/comments","events_url":"https://api.github.com/repos/angular/angular/issues/18525/events","html_url":"https://github.com/angular/angular/issues/18525","id":247971750,"number":18525,"title":"Binding to a large array makes change detection very slow","user":{"login":"aminpaks","id":9244395,"avatar_url":"https://avatars0.githubusercontent.com/u/9244395?v=4","gravatar_id":"","url":"https://api.github.com/users/aminpaks","html_url":"https://github.com/aminpaks","followers_url":"https://api.github.com/users/aminpaks/followers","following_url":"https://api.github.com/users/aminpaks/following{/other_user}","gists_url":"https://api.github.com/users/aminpaks/gists{/gist_id}","starred_url":"https://api.github.com/users/aminpaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aminpaks/subscriptions","organizations_url":"https://api.github.com/users/aminpaks/orgs","repos_url":"https://api.github.com/users/aminpaks/repos","events_url":"https://api.github.com/users/aminpaks/events{/privacy}","received_events_url":"https://api.github.com/users/aminpaks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-08-04T10:54:13Z","updated_at":"2017-08-06T17:29:24Z","closed_at":"2017-08-04T16:25:00Z","body":"## I'm submitting a...\r\n<!-- Check one of the following options with \"x\" -->\r\n<pre><code>[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->\r\n[x] Feature request\r\n</code></pre>\r\n\r\n## Current behavior\r\nPassing arrays with more than one million elements as an `@Input` binding makes the whole change detection mechanism very slow.\r\n\r\n\r\n## Expected behavior\r\nEither change detection should work flawlessly, or if the process costs too much there must be an option to specify how to check the changes, maybe we can turn off detection in this case and not detect any changes for that specific input after it's set.\r\n\r\n## Minimal reproduction of the problem with instructions\r\nOpen [this example](http://embed.plnkr.co/TzjkbxIShyfofQpKi6yS/) and observe.\r\nNote that `Small List` button will set `1000` elements to the Array and the performance will become 10 times faster.\r\n\r\n## What is the motivation / use case for changing the behavior?\r\nIn large applications there are cases that developer needs to be in charge of controlling every single part of the application. Even though Angular ships with lots of good features and it's a great framework, sometimes the closed mechanism of doing things in its ecosystem makes it difficult to scale.\r\n\r\nI hope you understand the motivation.\r\n\r\nThanks in advance.\r\n\r\n## Environment\r\n\r\n<pre><code>Angular version: 4.3.3\r\n\r\nBrowser: All \r\n\r\nFor Tooling issues:\r\n- Node version: 7.10.0  <!-- run `node --version` -->\r\n- Platform:  macOS Sierra\r\n</code></pre>\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/320520520","html_url":"https://github.com/angular/angular/issues/18525#issuecomment-320520520","issue_url":"https://api.github.com/repos/angular/angular/issues/18525","id":320520520,"user":{"login":"mlc-mlapis","id":5693835,"avatar_url":"https://avatars3.githubusercontent.com/u/5693835?v=4","gravatar_id":"","url":"https://api.github.com/users/mlc-mlapis","html_url":"https://github.com/mlc-mlapis","followers_url":"https://api.github.com/users/mlc-mlapis/followers","following_url":"https://api.github.com/users/mlc-mlapis/following{/other_user}","gists_url":"https://api.github.com/users/mlc-mlapis/gists{/gist_id}","starred_url":"https://api.github.com/users/mlc-mlapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlc-mlapis/subscriptions","organizations_url":"https://api.github.com/users/mlc-mlapis/orgs","repos_url":"https://api.github.com/users/mlc-mlapis/repos","events_url":"https://api.github.com/users/mlc-mlapis/events{/privacy}","received_events_url":"https://api.github.com/users/mlc-mlapis/received_events","type":"User","site_admin":false},"created_at":"2017-08-06T17:29:24Z","updated_at":"2017-08-06T17:29:24Z","body":"@aminpaks ... but you are because the BIG ARRAY is the primitive data type and for this the reference is always changed when passed through ... it is JavaScript thing ... you cann't change it. It is the same as if you pass `{myArray: [0,1,2]}` directly as value instead of passing a ref to the variable to which you store the object first."}}
{"actor":{"display_login":"mlc-mlapis"}}