{"id":231,"date":"2019-11-01T13:42:54","date_gmt":"2019-11-01T13:42:54","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/performance\/amount-of-calculated-attributes\/"},"modified":"2020-07-08T14:35:30","modified_gmt":"2020-07-08T14:35:30","slug":"calculatedattributesamount","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/calculatedattributesamount","title":{"rendered":"Entity should have a maximum of N calculated attributes"},"content":{"rendered":"\n<p>Calculated attributes are continuously re-calculated upon request of the entity and often a cause of bad performance. Instead, it is recommended to pre-calculate values in before-commit microflows or find a way to do the calculation on the client-side. See this post for more information <a href=\"https:\/\/forum.mendixcloud.com\/link\/questions\/85957\">https:\/\/forum.mendixcloud.com\/link\/questions\/85957<\/a> <\/p>\n\n\n\n<p>It is possible to set this rule to allow a maximum of 0 calculated attributes to completely prohibit calculated attributes are not allowed at all.<br>Alternatively, it is possible to configure a small number of allowed calculated attributes per entity e.g 1 or 2. <\/p>\n\n\n\n<p><strong>Noncompliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"502\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-54.png\" alt=\"\" class=\"wp-image-987\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-54.png 975w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-54-480x247.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 975px, 100vw\" \/><\/figure>\n","protected":false},"featured_media":0,"parent":95,"menu_order":4,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-231","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/231"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=231"}],"version-history":[{"count":4,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/231\/revisions"}],"predecessor-version":[{"id":988,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/231\/revisions\/988"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/95"}],"next":[{"title":"Project role should have at most one module role per module","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/overlappingmoduleroles","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/247"}],"prev":[{"title":"Dropdown reference selectors should be used sparingly","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/referenceselectoramount","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1270"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=231"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}