[
https://issues.apache.org/jira/browse/OFBIZ-10934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16822194#comment-16822194
]
Mathieu Lirzin commented on OFBIZ-10934:
----------------------------------------
Hello,
while I agree that {{String#replace}} should be used in place of
{{String#replaceAll}} when a simple string replacement is made because it is
more specific and minimal, I am not comfortable with any performance claim that
is not backed by some measurements. :-)
Are the fixes made by [^OFBIZ-10934.patch] exhaustive, or is it just a random
sample ? Both cases are fine in my opinion, I just want to understand how far
you have investigated to know If it worths more investigation on my side.
Thanks for you patch.
> Performance Increase: Using replace() instead of replaceAll() when a regex is
> not used increases performance
> ------------------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-10934
> URL: https://issues.apache.org/jira/browse/OFBIZ-10934
> Project: OFBiz
> Issue Type: Bug
> Reporter: bd2019us
> Priority: Major
> Labels: pull-request-available
> Attachments: OFBIZ-10934.patch
>
>
> Affected files:
> # framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
> #
> framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
> When replaceAll() is utilized and no regex is used, replaceAll() can be
> replaced with replace() for better performance
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)