Title: perf(orderBy): filters needlessly executed on every digest · Issue #16348 · angular/angular.js · GitHub
Open Graph Title: perf(orderBy): filters needlessly executed on every digest · Issue #16348 · angular/angular.js
X Title: perf(orderBy): filters needlessly executed on every digest · Issue #16348 · angular/angular.js
Description: I'm submitting a ... bug report feature request other Current behavior: from the docs: When filters are executed In templates, filters are only executed when their inputs have changed... There are two exceptions to this rule: 1. In gener...
Open Graph Description: I'm submitting a ... bug report feature request other Current behavior: from the docs: When filters are executed In templates, filters are only executed when their inputs have changed... There are ...
X Description: I'm submitting a ... bug report feature request other Current behavior: from the docs: When filters are executed In templates, filters are only executed when their inputs have changed... There ...
Opengraph URL: https://github.com/angular/angular.js/issues/16348
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"perf(orderBy): filters needlessly executed on every digest","articleBody":"**I'm submitting a ...**\r\n\u003c!-- (check one with \"x\") -->\r\n- [ ] bug report\r\n- [x] feature request\r\n- [ ] other \u003c!--(Please do not submit support requests here - see above)-->\r\n\r\n**Current behavior:**\r\n\u003c!-- Describe how the bug manifests / how the current features are insufficient. -->\r\nfrom [the docs](https://docs.angularjs.org/guide/filter#when-filters-are-executed):\r\n> When filters are executed\r\n> In templates, filters are only executed when their inputs have changed... There are two exceptions to this rule: 1. In general, this applies only to filters that take primitive values as inputs. Filters that receive Objects as input are executed on each $digest, as it would be too costly to track if the inputs have changed...\r\n\r\nThis effectively means that in all the instances of `ng-repeat` that use `orderBy`, this filter is rerun on every digest. Instead of \"costly\" tracking the input array for changes, the framework first sorts this array and then still tracks it. The sorting part here is a pure performance loss which doesn't make any sense.\r\n\r\n**Expected / new behavior:**\r\nSimilar to the `$stateful` flag, it'd be great to have another flag for filters like `orderBy`. This flag will make the filter be executed only if its inputs have changed even if the inputs are objects.\r\n\r\n**Minimal reproduction of the problem with instructions:**\r\nhttp://jsbin.com/nulonon/edit?html,js,output\r\n\r\n**AngularJS version:** 1.6.x, 1.5.x\r\n\r\n**Browser:** all","author":{"url":"https://github.com/thorn0","@type":"Person","name":"thorn0"},"datePublished":"2017-11-28T10:51:24Z","url":"https://github.com/angular/angular.js/issues/16348"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7b0f11c7-e91f-4cde-297f-862f679849a2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1E6:2F2F14:1EA985:29C190:6AFD8F15 |
| html-safe-nonce | 027011156ec957508ed599a61234d62d9f93a21a8547a9543695c911ce7c5728 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUU2OjJGMkYxNDoxRUE5ODU6MjlDMTkwOjZBRkQ4RjE1IiwidmlzaXRvcl9pZCI6Ijg5MTI4MjgwMzE3OTAwNTkyODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b4e982ddbbed19cab5141f15058cba32e169be49ba03d9376df4402c3da74bc3 |
| hovercard-subject-tag | issue:277339513 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular.js/16348/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0575e74ffbf6c8ac7c85a4f8f6e940f9ee06c5f9cdc7d417f0ef489e1398fdd9/angular/angular.js/issues/16348 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0575e74ffbf6c8ac7c85a4f8f6e940f9ee06c5f9cdc7d417f0ef489e1398fdd9/angular/angular.js/issues/16348 |
| og:image:alt | I'm submitting a ... bug report feature request other Current behavior: from the docs: When filters are executed In templates, filters are only executed when their inputs have changed... There are ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | thorn0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular.js git https://github.com/angular/angular.js.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 460078 |
| octolytics-dimension-repository_nwo | angular/angular.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 460078 |
| octolytics-dimension-repository_network_root_nwo | angular/angular.js |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width