You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "tbw777 (via GitHub)" <gi...@apache.org> on 2023/02/10 10:35:54 UTC
[GitHub] [netbeans] tbw777 opened a new pull request, #5464: Prevented unnessasary StringBuilder/StringBuffer creation
tbw777 opened a new pull request, #5464:
URL: https://github.com/apache/netbeans/pull/5464
No need to create SB every time.
Its more better to reuse existing object via setLength(0) method call.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] tbw777 closed pull request #5464: Prevented unnessasary StringBuilder/StringBuffer creation
Posted by "tbw777 (via GitHub)" <gi...@apache.org>.
tbw777 closed pull request #5464: Prevented unnessasary StringBuilder/StringBuffer creation
URL: https://github.com/apache/netbeans/pull/5464
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] mbien commented on pull request #5464: Prevented unnessasary StringBuilder/StringBuffer creation
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #5464:
URL: https://github.com/apache/netbeans/pull/5464#issuecomment-1426586929
object reuse can be more expensive than allocating a new object. That is the whole point of a generational garbage collector: it is very good at cleaning short lived objects in chunks since it assumes most of them are short lived.
I am not in favor of blindly applying this everywhere since it is not obvious that it is of any benefit. If there are places identified which benefit from this - awesome. But lets not do this everywhere.
going to remove myself from the review list since I don't really want to review this unless it is reduces to a manageable size and proven that it is of any benefit.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] lkishalmi commented on pull request #5464: Prevented unnessasary StringBuilder/StringBuffer creation
Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on PR #5464:
URL: https://github.com/apache/netbeans/pull/5464#issuecomment-1426583853
And very low value/noise ratio.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] lkishalmi commented on pull request #5464: Prevented unnessasary StringBuilder/StringBuffer creation
Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on PR #5464:
URL: https://github.com/apache/netbeans/pull/5464#issuecomment-1426583670
Well, yet another set of ambivalent changes.
Some of these could be valid, some of them indifferent and there are a few places, when it hurts the readability of the code a little.
Object creation in Java is cheap, really cheap. Doing these optimization on exception handlers, test code, simply does not worth.
Also there are a lot of places where the new code is more complex than the original one including a null check. that's just bad.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists