You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/07/08 22:49:28 UTC

[GitHub] [groovy] eric-milles opened a new pull request #1304: GROOVY-9601: reduce method calls in findClassMember and getPropertyName

eric-milles opened a new pull request #1304:
URL: https://github.com/apache/groovy/pull/1304


   Complete the conversion of `VariableScopeVisitor#findClassMember` from recursive to iterative.  Rewrite `MethodNodeUtils#getPropertyName` to check characters instead of strings.  You might be able to gain a bit by inlining `BeanUtils#decapitalize`.  You can also test for `void` and `boolean` using == if you get the redirect of the return type.
   
   Can you give this a try with your performance test(s)?  I got about 1 sec improvement (4500ms vs 5500ms) with the Groovy9601_CLASSGEN test.  I'd be interested to see the SVG now.
   
   https://issues.apache.org/jira/browse/GROOVY-9601


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] danielsun1106 merged pull request #1304: GROOVY-9601: reduce method calls in findClassMember and getPropertyName

Posted by GitBox <gi...@apache.org>.
danielsun1106 merged pull request #1304:
URL: https://github.com/apache/groovy/pull/1304


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] danielsun1106 commented on pull request #1304: GROOVY-9601: reduce method calls in findClassMember and getPropertyName

Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1304:
URL: https://github.com/apache/groovy/pull/1304#issuecomment-655839198


   Merged. Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] danielsun1106 edited a comment on pull request #1304: GROOVY-9601: reduce method calls in findClassMember and getPropertyName

Posted by GitBox <gi...@apache.org>.
danielsun1106 edited a comment on pull request #1304:
URL: https://github.com/apache/groovy/pull/1304#issuecomment-655833655


   Here is the output of async profiler for Groovy9601_CLASSGEN executed on the distribution built from master and this PR:
   [groovy9601.zip](https://github.com/apache/groovy/files/4893886/groovy9601.zip)
   
   As we can see, `getPropertyName` costs less time, which is reduced from `9.97%`(5.16% + 4.77%) to `9.00%`(4.50% + 4.50%)
   
   P.S. master costs 13000ms and this pr costs 12000ms on my machine, something is better than nothing ;-)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [groovy] danielsun1106 commented on pull request #1304: GROOVY-9601: reduce method calls in findClassMember and getPropertyName

Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1304:
URL: https://github.com/apache/groovy/pull/1304#issuecomment-655833655


   Here is the output of async profiler for Groovy9601_CLASSGEN executed on the distribution built from master and this PR:
   [groovy9601.zip](https://github.com/apache/groovy/files/4893886/groovy9601.zip)
   
   As we can see, `getPropertyName` costs less time, which is reduced `9.97%`(5.16% + 4.77%) to `9.00%`(4.50% + 4.50%)
   
   P.S. master costs 13000ms and this pr costs 12000ms on my machine, something is better than nothing ;-)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org