-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix/3327/fix-parser-suggestions-slow #3329
Conversation
analysis/model/src/main/kotlin/de/maibornwolff/codecharta/util/ResourceSearchHelper.kt
Outdated
Show resolved
Hide resolved
analysis/model/src/main/kotlin/de/maibornwolff/codecharta/util/ResourceSearchHelper.kt
Outdated
Show resolved
Hide resolved
...SonarImporter/src/main/kotlin/de/maibornwolff/codecharta/importer/sonar/SonarImporterMain.kt
Outdated
Show resolved
Hide resolved
I did some testing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Though, added one a small remark.
I refactored the ResourceSearchHelper because it was a "one class to fit all needs" implementation and was only tested by its users. What I did was split the main function up into two separate functions, remove special cases which were only needed in edge cases for some of the using classes, add some additional validation to cover edge cases which were previously not thought of and add own unit testing for the ResourceSearchHelper. Additionally I removed some unneeded operations which further sped up the parser suggestions. |
# Conflicts: # CHANGELOG.md # analysis/import/SonarImporter/src/test/kotlin/de/maibornwolff/codecharta/importer/sonar/SonarImporterMainTest.kt # analysis/model/src/main/kotlin/de/maibornwolff/codecharta/util/ResourceSearchHelper.kt # analysis/parser/RawTextParser/src/test/kotlin/de/maibornwolff/codecharta/indentationlevelparser/RawTextParserTest.kt
...SonarImporter/src/main/kotlin/de/maibornwolff/codecharta/importer/sonar/SonarImporterMain.kt
Outdated
Show resolved
Hide resolved
analysis/model/src/main/kotlin/de/maibornwolff/codecharta/util/ResourceSearchHelper.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
[CodeCharta Analysis] Kudos, SonarCloud Quality Gate passed! |
[CodeCharta Visualization] Kudos, SonarCloud Quality Gate passed! |
Speed up parser suggestions
Issue: #3327
Description
This PR aims to make the parser suggestions less slow and make the user aware that the shell did not crash when applicability is calculated.
To do this, some messages are logged when each parser finished checking for applicability and which folders are scanned for applicability.
Additionally some optimizations are done to increase the checking speed, especially for the MetricGardener.