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 2021/09/10 03:32:53 UTC

[GitHub] [incubator-eventmesh] DittoTool opened a new pull request #517: Inefficient Usage of Java Collection

DittoTool opened a new pull request #517:
URL: https://github.com/apache/incubator-eventmesh/pull/517


   Hi,
   
   We find that there are several inefficient usages of Java Collections:
   
   1. The contains method is invoked upon a list object in a loop. We recommend replacing it with a HashSet.
   Random access can occur at several linkedlist objects, which run in linear time complexity. We recommend replacing them with Arraylist objects.
   2. ArrayList is inserted before an iteration, while multiple memory reallocation might occur when the size of the list exceeds its capacity. We recommend replacing it with a LinkedList.
   3. LinkedList is not inefficient when we perform random access upon it. We recommend replacing it with an ArrayList.
   
   We discovered the above inefficient usage of containers by our tool Ditto. The patch is submitted. Could you please check and accept it? We have tested the patch on our PC. The patched program works well.
   
   Bests
   
   Ditto


-- 
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] DittoTool commented on pull request #517: Inefficient Usage of Java Collection

Posted by GitBox <gi...@apache.org>.
DittoTool commented on pull request #517:
URL: https://github.com/apache/incubator-eventmesh/pull/517#issuecomment-916692403


   > LGTM, but you need to change this pr push to develop branch.
   
   Thank you for your confirmation. I will do it.


-- 
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] DittoTool closed pull request #517: Inefficient Usage of Java Collection

Posted by GitBox <gi...@apache.org>.
DittoTool closed pull request #517:
URL: https://github.com/apache/incubator-eventmesh/pull/517


   


-- 
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] DittoTool commented on pull request #517: Inefficient Usage of Java Collection

Posted by GitBox <gi...@apache.org>.
DittoTool commented on pull request #517:
URL: https://github.com/apache/incubator-eventmesh/pull/517#issuecomment-916715879


   We have changed them from `master` to `develop` in #518. @ruanwenjun 


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