[ 
https://issues.apache.org/jira/browse/SLING-4544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14384076#comment-14384076
 ] 

Bertrand Delacretaz commented on SLING-4544:
--------------------------------------------

Good point about keeping references if we do lazy evaluation. I first thought 
that doesn't matter as it's only during the scope of a request, but the 
webconsole's RequestHistoryConsolePlugin keeps a (small) number of 
RequestProgressTracker objects around, so would prevent them from being garbage 
collected.

Using a simple formatter by default and switching to the full MessageFormat 
sounds good as long as analyzing which one you need is cheap.

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

Reply via email to