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/09 17:08:55 UTC
[GitHub] [groovy] danielsun1106 opened a new pull request #1306: GROOVY-9631: Replace legacy data structure with Java collection
danielsun1106 opened a new pull request #1306:
URL: https://github.com/apache/groovy/pull/1306
----------------------------------------------------------------
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 #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-656785852
Grails joint build is green:
https://github.com/apache/groovy/runs/858782411
----------------------------------------------------------------
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 removed a comment on pull request #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 removed a comment on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-656790703
----------------------------------------------------------------
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 removed a comment on pull request #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 removed a comment on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-657132256
I'm going to replace more legacy data structure, so convert the PR to draft for now.
----------------------------------------------------------------
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 #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-656790703
@paulk-asert ping ;-)
----------------------------------------------------------------
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] blackdrag commented on pull request #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
blackdrag commented on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-664822302
----------------------------------------------------------------
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 #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-657010645
@paulk-asert The PR is targeted to 4.0.0 only and is ready for reviewing now.
----------------------------------------------------------------
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 #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 edited a comment on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-665997982
@blackdrag As to your worries about performance, I created benchmark project to test the performance of concurrent maps ( https://github.com/danielsun1106/benchmark-concurrentmaps )
Here is the result generated on my local machine:
```
Benchmark Mode Cnt Score Error Units
ConcurrentMapBench.testConcurrentIdentityHashMap_get thrpt 15 176.293 ± 14.399 ops/ms
ConcurrentMapBench.testConcurrentIdentityHashMap_put thrpt 15 11.263 ± 8.088 ops/ms
ConcurrentMapBench.testConcurrentReferenceHashMap_get thrpt 15 197.955 ± 12.753 ops/ms
ConcurrentMapBench.testConcurrentReferenceHashMap_put thrpt 15 194.053 ± 4.108 ops/ms
ConcurrentMapBench.testManagedConcurrentMap_get thrpt 15 154.559 ± 5.860 ops/ms
ConcurrentMapBench.testManagedConcurrentMap_put thrpt 15 10.226 ± 9.142 ops/ms
ConcurrentMapBench.testManagedIdentityConcurrentMap_get thrpt 15 140.041 ± 2.827 ops/ms
ConcurrentMapBench.testManagedIdentityConcurrentMap_put thrpt 15 6.897 ± 5.559 ops/ms
```
According to the performance test report, `ManagedIdentityConcurrentMap` is as efficient as `ManagedConcurrentMap` when executing `get` method, but less efficient when executing `put` method.
Also, `ConcurrentReferenceHashMap` based on `ConcurrentMap` is more efficient than other alternatives, so I am going to polish `ManagedIdentityConcurrentMap` and make it base on `ConcurrentReferenceHashMap` written by Doug Lea.
P.S. `ManagedIdentityConcurrentMap` and `ManagedConcurrentMap` are from Groovy 4.0 (master branch), and `ConcurrentIdentityHashMap` is written by Doug Lea too.
----------------------------------------------------------------
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 removed a comment on pull request #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 removed a comment on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-657010645
@paulk-asert The PR is targeted to 4.0.0 only and is ready for reviewing now.
----------------------------------------------------------------
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 #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-664923324
@blackdrag Actually I have not sorted the fields on purpose. After we use `LinkedHashMap`, the order changes and I find it always keeps the order of fields declared. In order to control the expectation of users, I do not announce keeping field order in the JIRA ticket now ;-)
----------------------------------------------------------------
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 #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-657132256
I'm going to replace more legacy data structure, so convert the PR to draft for now.
----------------------------------------------------------------
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 #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-657010298
Grails joint build is green:
https://github.com/apache/groovy/runs/860503230
----------------------------------------------------------------
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 removed a comment on pull request #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 removed a comment on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-656785852
Grails joint build is green:
https://github.com/apache/groovy/runs/858782411
----------------------------------------------------------------
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 #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-665997982
@blackdrag As to your worries about performance, I created benchmark project to test the performance of concurrent maps ( https://github.com/danielsun1106/benchmark-concurrentmaps )
Here is the result generated on my local machine:
```
Benchmark Mode Cnt Score Error Units
ConcurrentMapBench.testConcurrentIdentityHashMap_get thrpt 15 176.293 ± 14.399 ops/ms
ConcurrentMapBench.testConcurrentIdentityHashMap_put thrpt 15 11.263 ± 8.088 ops/ms
ConcurrentMapBench.testConcurrentReferenceHashMap_get thrpt 15 197.955 ± 12.753 ops/ms
ConcurrentMapBench.testConcurrentReferenceHashMap_put thrpt 15 194.053 ± 4.108 ops/ms
ConcurrentMapBench.testManagedConcurrentMap_get thrpt 15 154.559 ± 5.860 ops/ms
ConcurrentMapBench.testManagedConcurrentMap_put thrpt 15 10.226 ± 9.142 ops/ms
ConcurrentMapBench.testManagedIdentityConcurrentMap_get thrpt 15 140.041 ± 2.827 ops/ms
ConcurrentMapBench.testManagedIdentityConcurrentMap_put thrpt 15 6.897 ± 5.559 ops/ms
```
According to the performance test report, `ManagedIdentityConcurrentMap` is almost same efficient to `ManagedConcurrentMap` when executing `get` method, but less efficient when executing `put` method.
Also, `ConcurrentReferenceHashMap` based on `ConcurrentMap` is more efficient than other alternatives, so I am going to polish `ManagedIdentityConcurrentMap` and make it base on `ConcurrentReferenceHashMap` written by Doug Lea.
P.S. `ManagedIdentityConcurrentMap` and `ManagedConcurrentMap` are from Groovy 4.0 (master branch), and `ConcurrentIdentityHashMap` is written by Doug Lea too.
----------------------------------------------------------------
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 #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
danielsun1106 commented on pull request #1306:
URL: https://github.com/apache/groovy/pull/1306#issuecomment-657154718
Before the PR applied, the properties in the json output is out of order.
After the PR applied, the properties in the json output keeps the original order in the its class now.
As a result, the PR will break some tests of Grails, but it's easy for Grails developers to fix:
https://github.com/apache/groovy/runs/861801220
@paulk-asert It's ready to review. I'm not sure if it could be merged into 3.0.X branch too...
----------------------------------------------------------------
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] asfgit closed pull request #1306: GROOVY-9631: Replace legacy data structure with Java collection
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #1306:
URL: https://github.com/apache/groovy/pull/1306
----------------------------------------------------------------
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