Advanced Customization > Business Logic Customization > Customizations in Type and Attribute Management > Using a BusinessAlgorithm in a Calculated Attribute > Performance Considerations
  
Performance Considerations
Be aware that your business algorithm will be evaluated wherever your calculated attribute appears in the Windchill UI. For example, if a table has been customized to display your calculated attribute, the business algorithm needs to be run for each row in the table. If the algorithm involves database queries or complex computations it could potentially cause significant performance issues. Therefore it is highly recommended that your business algorithm be as performant as possible. Some ideas could include batched database queries, caching results and/or partial static computations, etc.
You may refer to the sample “sum” algorithm (AbstractCarambolaAttributeSumBusinessAlgorithm) discussed below, for an example on a reasonably performant algorithm for summing the values of an attribute over an entire Part structure. Also, you could refer to the CarambolaAttributeSumBusinessAlgorithmTestIntegration test for an example of performance testing this sample business algorithm.
* 
Rendering business algorithms in the PSB tree may take some additional time to complete. Therefore, it is recommended that your BusinessAlgorithm be as performant as possible.