You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/12/29 02:52:21 UTC

[GitHub] [incubator-eventmesh] Alonexc opened a new issue, #2702: [Enhancement] Some optimizations for collections

Alonexc opened a new issue, #2702:
URL: https://github.com/apache/incubator-eventmesh/issues/2702

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Enhancement Request
   
   ![image](https://user-images.githubusercontent.com/91315508/209896526-6ca2b79f-6203-4338-b8c7-2bc77e066c01.png)
   located at:
   eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/recommend/EventMeshRecommendImpl.java line 114,116,126,201,207
   
   
   ### Describe the solution you'd like
   
   1. Iteration call can be replaced with parametrized constructor call
   2. Collections.sort could be replaced with List.sort
   reference:
   ![image](https://user-images.githubusercontent.com/91315508/209896574-1101b438-75f9-417e-851e-1dfe69a75873.png)
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Alonexc closed issue #2702: [Enhancement] Some optimizations for collections

Posted by GitBox <gi...@apache.org>.
Alonexc closed issue #2702: [Enhancement] Some optimizations for collections
URL: https://github.com/apache/incubator-eventmesh/issues/2702


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] mvadharia commented on issue #2702: [Enhancement] Some optimizations for collections

Posted by GitBox <gi...@apache.org>.
mvadharia commented on issue #2702:
URL: https://github.com/apache/incubator-eventmesh/issues/2702#issuecomment-1371251370

   Hi @xwm1992 @Alonexc  , seems like this issue has already fixed and code has been updated.
   But I do have a suggestion on EventMeshRecommendImpl line 172 in recommendProxy() method, instead of looping through keys, retainAll method of Set after retrieving keySet() from Map, can be used to check if there exists a key in clientDistributionMap but not in eventMeshMap and vice versa if required.


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] Alonexc commented on issue #2702: [Enhancement] Some optimizations for collections

Posted by GitBox <gi...@apache.org>.
Alonexc commented on issue #2702:
URL: https://github.com/apache/incubator-eventmesh/issues/2702#issuecomment-1373198179

   > Hi @xwm1992 @Alonexc , seems like this issue has already fixed and code has been updated. But I do have a suggestion on EventMeshRecommendImpl line 172 in recommendProxy() method, instead of looping through keys, retainAll method of Set after retrieving keySet() from Map, can be used to check if there exists a key in clientDistributionMap but not in eventMeshMap and vice versa if required insteading of looping through entire keySet. I can raise PR for the improvement I mentioned and we can close this issue once done.
   
   @mvadharia Ok, I see that it has been fixed and I will close the issue.


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org