{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/2107","labels_url":"https://api.github.com/repos/angular/angular.js/issues/2107/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/2107/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/2107/events","html_url":"https://github.com/angular/angular.js/issues/2107","id":11720493,"number":2107,"title":"ngRepeat performance on removing item","user":{"login":"offsky","id":1110926,"avatar_url":"https://avatars.githubusercontent.com/u/1110926?v=3","gravatar_id":"","url":"https://api.github.com/users/offsky","html_url":"https://github.com/offsky","followers_url":"https://api.github.com/users/offsky/followers","following_url":"https://api.github.com/users/offsky/following{/other_user}","gists_url":"https://api.github.com/users/offsky/gists{/gist_id}","starred_url":"https://api.github.com/users/offsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/offsky/subscriptions","organizations_url":"https://api.github.com/users/offsky/orgs","repos_url":"https://api.github.com/users/offsky/repos","events_url":"https://api.github.com/users/offsky/events{/privacy}","received_events_url":"https://api.github.com/users/offsky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20ngRepeat","name":"component: ngRepeat","color":"fef2c0"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20investigation","name":"needs: investigation","color":"444444"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type:%20perf","name":"type: perf","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/27","html_url":"https://github.com/angular/angular.js/milestones/Backlog","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/27/labels","id":489171,"number":27,"title":"Backlog","description":"Holds the backlog of issues and pull requests that have been triaged.\r\n\r\nBefore assigning items to this milestone they should be labelled, at the very least with the correct \"type\" label (i.e. \"issue\", \"pr\", \"bug\", \"regression\", \"chore\", \"docs\", etc).  Preferably you should also check for duplicate issues/PRs, note CLA status and assign \"complexity\" and \"impact\" labels too.","creator":{"login":"IgorMinar","id":216296,"avatar_url":"https://avatars.githubusercontent.com/u/216296?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"open_issues":683,"closed_issues":993,"state":"open","created_at":"2013-11-18T23:30:35Z","updated_at":"2015-10-05T17:56:08Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2013-03-06T16:38:28Z","updated_at":"2015-10-05T21:27:55Z","closed_at":null,"body":"If you remove the last item in an ngRepeat, it is really fast. If you remove the first item in an ngRepeat it is really slow.  I believe that this can be optimized so that it is constant speed regardless of the position of the item being deleted.\r\n\r\nFrom what I can tell, when you remove an item in an ngRepeat, Angular iterates over the items that come after it, and for each one it runs this line \"cursor.after(last.element)\" to move each DOM element up one position.  All these DOM removals and inserts are really not necessary if the order of the remaining items is the same. It should be possible to optimize this to do a single .remove() when items are removed by not reordered.\r\n\r\nThis optimization may also apply to adding items without reordering."},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/145673518","html_url":"https://github.com/angular/angular.js/issues/2107#issuecomment-145673518","issue_url":"https://api.github.com/repos/angular/angular.js/issues/2107","id":145673518,"user":{"login":"neolace","id":3539832,"avatar_url":"https://avatars.githubusercontent.com/u/3539832?v=3","gravatar_id":"","url":"https://api.github.com/users/neolace","html_url":"https://github.com/neolace","followers_url":"https://api.github.com/users/neolace/followers","following_url":"https://api.github.com/users/neolace/following{/other_user}","gists_url":"https://api.github.com/users/neolace/gists{/gist_id}","starred_url":"https://api.github.com/users/neolace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neolace/subscriptions","organizations_url":"https://api.github.com/users/neolace/orgs","repos_url":"https://api.github.com/users/neolace/repos","events_url":"https://api.github.com/users/neolace/events{/privacy}","received_events_url":"https://api.github.com/users/neolace/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T21:27:55Z","updated_at":"2015-10-05T21:27:55Z","body":"@CMCDragonkai, It all depends on where your opinion of the middle is and the amount of data your loading. \r\n\r\nIs this still an issue?"}}