Title: computed efficieny improvement · Issue #56269 · angular/angular · GitHub
Open Graph Title: computed efficieny improvement · Issue #56269 · angular/angular
X Title: computed efficieny improvement · Issue #56269 · angular/angular
Description: Which @angular/* package(s) are relevant/related to the feature request? core Description Hi Right now, computed re evaluates every time any of the underlying signal's properties change, regardless of whether the computed is accessing th...
Open Graph Description: Which @angular/* package(s) are relevant/related to the feature request? core Description Hi Right now, computed re evaluates every time any of the underlying signal's properties change, regardless...
X Description: Which @angular/* package(s) are relevant/related to the feature request? core Description Hi Right now, computed re evaluates every time any of the underlying signal's properties change, regard...
Opengraph URL: https://github.com/angular/angular/issues/56269
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"computed efficieny improvement","articleBody":"### Which @angular/* package(s) are relevant/related to the feature request?\n\ncore\n\n### Description\n\nHi\r\nRight now, computed re evaluates every time any of the underlying signal's properties change, regardless of whether the computed is accessing this property or not, which leads to unnecessary computations and possible re renders.\r\n\r\nComing from MobX, which also has computed but works as described above, makes computed very efficient and performant.\r\nI hope you can consider this improvement, since especially in expensive computations will have a major impact in performance.\r\n\r\nBelow is an example of the scenario I described\r\nhttps://stackblitz.com/edit/stackblitz-starters-pjevlf?file=src%2Fapp%2Fservice.ts\r\n\r\nEvery time the signal's name updates, the computed that calculates the total price re evaluates, although the computed only reads the price property and never accesses the name property.\r\n\r\nRegards\n\n### Proposed solution\n\ncomputed should re evaluate only when the signal properties it accesses, change.\n\n### Alternatives considered\n\nNone","author":{"url":"https://github.com/bellostom","@type":"Person","name":"bellostom"},"datePublished":"2024-06-05T06:25:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/56269/angular/issues/56269"}
| 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:e5afd895-19db-8610-63a2-f0965a378673 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C8FC:14FB0B:520DC31:6AAEB6F:697522B3 |
| html-safe-nonce | d17b6206286fcf028d4a5e8d42446458ee2d658ece9539ce82f5203ee30401f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEZDOjE0RkIwQjo1MjBEQzMxOjZBQUVCNkY6Njk3NTIyQjMiLCJ2aXNpdG9yX2lkIjoiMjMzOTY0ODY1OTkxNTA4ODU2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5bb200f5327031c5b93f8f4cc9e7072df3d375458e01e4b7ac1aa91fb49f1589 |
| hovercard-subject-tag | issue:2335010264 |
| 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/56269/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a6670fe6fd2083f20eb2e885d64a062fd2974000652a0acbd319e6b88d5517a9/angular/angular/issues/56269 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a6670fe6fd2083f20eb2e885d64a062fd2974000652a0acbd319e6b88d5517a9/angular/angular/issues/56269 |
| og:image:alt | Which @angular/* package(s) are relevant/related to the feature request? core Description Hi Right now, computed re evaluates every time any of the underlying signal's properties change, regardless... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bellostom |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width