Avoid Operation With High Cost In Loop

< 1 min read

Impact Area

Performance

Severity

Medium

Affected Element

Apex Class

Rule ID #

SF-AVOID-OPERATION-WITH-HIGH-COST-IN-LOOP

Impact #

Repeated calls to such methods inside loops can significantly slow down application performance, especially in large organizations.

Remediation #

Extract such method calls outside the loop and execute them only once to optimize performance.

Time to fix

30 min

Updated on March 21, 2025
Table of contents
Was it helpful ?