{"action":"created","issue":{"url":"https://api.github.com/repos/One-com/knockout-transformations/issues/8","labels_url":"https://api.github.com/repos/One-com/knockout-transformations/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/One-com/knockout-transformations/issues/8/comments","events_url":"https://api.github.com/repos/One-com/knockout-transformations/issues/8/events","html_url":"https://github.com/One-com/knockout-transformations/pull/8","id":105049331,"number":8,"title":"SortBy optimisations","user":{"login":"AdamWillden","id":4629144,"avatar_url":"https://avatars.githubusercontent.com/u/4629144?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWillden","html_url":"https://github.com/AdamWillden","followers_url":"https://api.github.com/users/AdamWillden/followers","following_url":"https://api.github.com/users/AdamWillden/following{/other_user}","gists_url":"https://api.github.com/users/AdamWillden/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWillden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWillden/subscriptions","organizations_url":"https://api.github.com/users/AdamWillden/orgs","repos_url":"https://api.github.com/users/AdamWillden/repos","events_url":"https://api.github.com/users/AdamWillden/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWillden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-05T21:16:24Z","updated_at":"2015-09-08T08:08:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/One-com/knockout-transformations/pulls/8","html_url":"https://github.com/One-com/knockout-transformations/pull/8","diff_url":"https://github.com/One-com/knockout-transformations/pull/8.diff","patch_url":"https://github.com/One-com/knockout-transformations/pull/8.patch"},"body":"@sunesimonsen you may remember me from the knockout-projections fork. I've finally gotten round to splitting out my commits. These are the commits you'd be most interested in and I believe should contain some performance gains. That said I have no way to confirm. Could you see if there is any gain in what I've done?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/One-com/knockout-transformations/issues/comments/138468934","html_url":"https://github.com/One-com/knockout-transformations/pull/8#issuecomment-138468934","issue_url":"https://api.github.com/repos/One-com/knockout-transformations/issues/8","id":138468934,"user":{"login":"AdamWillden","id":4629144,"avatar_url":"https://avatars.githubusercontent.com/u/4629144?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWillden","html_url":"https://github.com/AdamWillden","followers_url":"https://api.github.com/users/AdamWillden/followers","following_url":"https://api.github.com/users/AdamWillden/following{/other_user}","gists_url":"https://api.github.com/users/AdamWillden/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWillden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWillden/subscriptions","organizations_url":"https://api.github.com/users/AdamWillden/orgs","repos_url":"https://api.github.com/users/AdamWillden/repos","events_url":"https://api.github.com/users/AdamWillden/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWillden/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T08:08:06Z","updated_at":"2015-09-08T08:08:06Z","body":"@sunesimonsen not at all.\r\n\r\nThese were changes I **thought** should contain perceivable gains over large collections. I had no way to test such large collections and knew you did. If there's no gains then please don't worry and simply close the PR, I will maintain my code in my fork.\r\n\r\nThe main change I thought would bring optimisations was the removal of a fair number of inline function instantiations, which incidentally I feel declutters the code. \r\n\r\nOne place for performance gains I thought would be during the addQueue processing because the mappingEvaluation is only performed once for the item being added and for every binary comparison. I think the best way to do test this is to chain sortBy on top of a filter, filter out a number of results and then dynamically disable the filter to add them back in. I assume you have that ability in your code.\r\n\r\nIn fact I've noticed a change in arrayChange deletionQueue which could in some scenarios have an adverse rather than positive affect over the original. I've just reverted that change to err on the side of caution though I still feel it would be more positive than adverse.\r\n\r\nI guess if there's no perceived gains then this is simply code refactoring aside from one behavioral change I have put in during arrayChange deletion to provide feedback into the mappingEvaluator that it is being executed for the purposes of searching for the item to delete. My usage for that is explained over  two comments here: https://github.com/One-com/knockout-projections/pull/7#issuecomment-69349942.\r\n"}}