[
https://issues.apache.org/jira/browse/SLING-4544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14384093#comment-14384093
]
Felix Meschberger edited comment on SLING-4544 at 3/27/15 4:29 PM:
-------------------------------------------------------------------
I think this can be cheap: scan the string for patterns {xxx} and work your
formatting along this scanning. As soon as you find a complex one stop scanning
create a new format from the rest of the format string and call
MessageFormat.format with the original arguments and append the result to the
work so far.
and then: I am not sure, whether this really makes a difference at all...
was (Author: fmeschbe):
I think this can be cheap: scan the string for patterns {xxx} and work your
formatting along this scanning. As soon as you find a complex one stop scanning
create a new format from the rest of the format string and call
MessageFormat.format with the original arguments and append the result to the
work so far.
> Performance: MessageFormat shouldn't be used for logging in
> SlingRequestProgressTracker
> ---------------------------------------------------------------------------------------
>
> Key: SLING-4544
> URL: https://issues.apache.org/jira/browse/SLING-4544
> Project: Sling
> Issue Type: Improvement
> Components: Engine
> Affects Versions: Engine 2.4.0
> Reporter: Joel Richard
> Labels: performance
> Attachments: Screen Shot 2015-03-25 at 10.42.05.png
>
>
> I am profiling an application where up to 5% of the rendering time is spent
> in MessageFormat.format for SlingRequestProgressTracker.log (see attached
> screenshot). Since the advanced capabilities of MessageFormat are not
> required here, it should be rather easy to implement a utility which supports
> \{x} as well but is much faster.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)