[
https://issues.apache.org/jira/browse/GROOVY-11609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943796#comment-17943796
]
ASF GitHub Bot commented on GROOVY-11609:
-----------------------------------------
codecov-commenter commented on PR #2186:
URL: https://github.com/apache/groovy/pull/2186#issuecomment-2798789566
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2186?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
Report
Attention: Patch coverage is `89.71963%` with `11 lines` in your changes
missing coverage. Please review.
> Project coverage is 68.9172%. Comparing base
[(`e0a001f`)](https://app.codecov.io/gh/apache/groovy/commit/e0a001f2caba32bd05fc7ecf123e89e9dc568e1e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
to head
[(`a5e827b`)](https://app.codecov.io/gh/apache/groovy/commit/a5e827b438fa0bc7ec091894ec9e505decb5cdcb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2186?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...codehaus/groovy/classgen/VariableScopeVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2186?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FVariableScopeVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL1ZhcmlhYmxlU2NvcGVWaXNpdG9yLmphdmE=)
| 89.7196% | [0 Missing and 11 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/2186?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/groovy/pull/2186?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2186 +/- ##
==================================================
+ Coverage 68.9132% 68.9172% +0.0040%
- Complexity 29592 29593 +1
==================================================
Files 1423 1423
Lines 113894 113931 +37
Branches 19750 19758 +8
==================================================
+ Hits 78488 78518 +30
+ Misses 28788 28787 -1
- Partials 6618 6626 +8
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2186?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...codehaus/groovy/classgen/VariableScopeVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2186?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FVariableScopeVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL1ZhcmlhYmxlU2NvcGVWaXNpdG9yLmphdmE=)
| `93.1416% <89.7196%> (-1.3162%)` | :arrow_down: |
... and [2 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2186/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests,
report on failures, and find test suite problems.
- :package: [JS Bundle
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save
yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
> Avoid finding same variable/class member repeatedly
> ---------------------------------------------------
>
> Key: GROOVY-11609
> URL: https://issues.apache.org/jira/browse/GROOVY-11609
> Project: Groovy
> Issue Type: Improvement
> Reporter: Daniel Sun
> Priority: Major
>
> When I debugged GROOVY-4721, I found {{VariableScopeVisitor}} will try to
> find same variable/class member again and again, the finding logic is quite
> complex. Unfortunately, {{VariableScopeVisitor}} is widely used, e.g.
> {{ResolveVisitor}}, {{JavaStubCompilationUnit}} and
> {{TraitASTTransformation}}. So it's better to avoid finding same
> variable/class member repeatedly to gain better performance.
> For example, in the following code, {{a}}, {{i}}, {{j}} will be tried to find
> many times:
> {code}
> class BubbleSort {
> public static void bubbleSort(int[] a) {
> for (int i = 0, n = a.length; i < n - 1; i++) {
> for (int j = 0; j < n - i - 1; j++) {
> if (a[j] > a[j + 1]) {
> int temp = a[j]
> a[j] = a[j + 1]
> a[j + 1] = temp
> }
> }
> }
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)