Nested Loops cause performance issues

Software EleganceCode Complexity

Why you should care

If the amount of data is large, nested loops are fully avoided due to performance issues. If the program is extracting small amount of data, then focus on SELECT statements than nested loops.
The indexed loop and READ statement using binary search are the best methods to avoid performance issues.

Business Impacts

Nested Loops can greatly reduce the innovative potential of the code because it negatively impacts performance.

Acceleration
5362

CAST Recommendations

Reduce the total number of parameters by subdividing your functions into more specialized and granular artifacts.

How we detect

This code insight checks all Abap artifacts containing nested loops. These are:
– LOOP … ENDLOOP
– DO … ENDDO
– WHILE … ENDWHILE
– PROVIDE … ENDPROVIDE
5362

About CAST and Highlight’s Code Insights

Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.

See featuresHow it works