[
https://issues.apache.org/jira/browse/OFBIZ-10934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16872092#comment-16872092
]
Jacques Le Roux commented on OFBIZ-10934:
-----------------------------------------
Hi,
The question was did you change from Math.random() to new Random()? I guess
it's explained by
https://stackoverflow.com/questions/738629/math-random-versus-random-nextintint.
I personnaly see no problem to have those changes with replaceAll() changes in
one patch.
Now there are issues with your patches.
# They are not standard patches, please use {{"git diff --no-prefix"}} to
create them: https://scribu.net/wordpress/svn-patches-from-git.html
# Even then, things have changed since, so your patches no longer apply
completely. Please recreate the patches against OFBIz trunk HEAD, and while at
it make only one!
TIA
> 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: Improvement
> Components: framework
> Affects Versions: Trunk
> Reporter: bd2019us
> Priority: Trivial
> Labels: pull-request-available
> Attachments: OFBIZ-10934.patch, OFBIZ10934-MORE.patch, affected_files
>
>
> 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
> #
> framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java
> # framework/base/src/main/java/org/apache/ofbiz/base/util/KeyStoreUtil.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)