-
Notifications
You must be signed in to change notification settings - Fork 71
Long runtime in Y_TEST_CODE_DETECTOR class #436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
bug
Something isn't working correctly
Comments
Closed
Merged
Merged
@ThomasKempfle: Solution available under branch |
Merged
lucasborin
added a commit
that referenced
this issue
Nov 1, 2021
2021-11-01 v.1.16.0 ------------------ * Prefer New: Dynamic Call with Parameters (#502) * DB Access in UT: Global Inheritance (#500) * DB Access in UT: Local Inheritance (#498) * Skip 'Prefer RETURNING to EXPORTING' when both exist (#490) * Pseudo Comment Usage: Multiple Inline Entries (#494) * Prefer Pragmas to Pseudo Comments: Multiple Pseudo Comments (#489) * Y_CHECK_MESSAGE_EASY_TO_FIND dump (#492) * Chain Declaration for Complex Structures (#488) * Empty Catch Alternative Pseudo Comment (#337) + Alternative Pseudo Comment (#486) * line_exists does not support the operator IN (#484) * Empty Catch: Test Double Framework (#483) * Y_CHECK_FORM: Screen Events (#454) * Magic Number: CASE SY-TABIX and CO NUMBERS (#480) * Magic Number: Leading Zeros (#479) * Prefer New to Create Object: Dynamic Type (#469) * Magic Number: Table Index (#468) * Use native *_wa variables (#474) * Refactoring (#436,#452,#458) * Cannot run unit tests on 752 (#461) * Profiles: Allow Exemptions (#447) * BAdI example class vs Percentage Comment (#443) * Unit-Test Assert Validator (#450) + Prefer Pragmas to Pseudo Comments (#421) + COLLECT restriction (#441) * RAP needs CREATE OBJECT ... FOR TESTING (#444) * Filter functional operands in "Unit Test Assert" check (#460)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check Name
Actual Behavior
Strangly, during the execution I noticed, that a vast amount of runtime is spent on the test-code-detector, which - I guess - is intended to identify ABAPunit test classes. I performed a SAT trace on the Code Pal and found, that >95% of runtime is lost inside of Y_TEST_CODE_DETECTOR.
When checking the Call Stack I found, that in method Y_CHECK_BOOLEAN_INPUT_PARAM->EXECUTE_CHECK( ) a LOOP on all the class statements is carried out.
Later in the callstack I found, that in method Y_TEST_CODE_DETECTOR->DETERMINE_TEST_CODE the same LOOP on all class statements is repeated.
Both LOOPs combined will lead to a quadratic number of execution of the underlying process_tokens( )-method and - for this behemoth of ABAP - will lead to an unrealistic high runtime.
Without fully understanding the motivation of the developer, it appears to be wrong, that the process_tokens( )-method is called <number_of_class_statements>^2 times.
You can replicate this issue by schedule a check run on the ABAPGit-Standalone class. I suppose, that other bigger ABAPs will also be affected.
Expected Behavior
The text was updated successfully, but these errors were encountered: