Avoid Operation With High Cost In Loop

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

Was it helpful ?
Table of contents

THE AI CODE GOVERNANCE BRIEF

Sign up for new updates!