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/10/21 07:20:53 UTC

[GitHub] [incubator-eventmesh] Alonexc opened a new issue, #1721: [Enhancement] Method concatenates strings using + in a loop [RedirectClientBySubSystemHandler]

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

   ### 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/197136419-7c0ef9a4-c3c9-4b58-b905-5f81ad490a86.png)
   located at:
   org/apache/eventmesh/runtime/admin/handler/RedirectClientBySubSystemHandler.java line 83 84
   analysis and explanation:
   The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration.
   
   ### Describe the solution you'd like
   
   Use the StringBuilder, append() method instead.
   
   ### 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] DeepikaMarthandanTW commented on issue #1721: [Enhancement] Method concatenates strings using + in a loop [RedirectClientBySubSystemHandler]

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

   I would like to work on this issue. @Alonexc @xwm1992 Can you please assign this task to me?


-- 
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] xwm1992 closed issue #1721: [Enhancement] Method concatenates strings using + in a loop [RedirectClientBySubSystemHandler]

Posted by GitBox <gi...@apache.org>.
xwm1992 closed issue #1721: [Enhancement] Method concatenates strings using + in a loop [RedirectClientBySubSystemHandler]
URL: https://github.com/apache/incubator-eventmesh/issues/1721


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