You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2011/03/24 14:25:05 UTC

[jira] [Issue Comment Edited] (JCR-2929) Various places do map lookups in loop instead of using entrySet iterator

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

Jukka Zitting edited comment on JCR-2929 at 3/24/11 1:23 PM:
-------------------------------------------------------------

The benefit of this change is improved iteration performance, but are any of these cases where the performance boost is notable or even measurable on a macro level? If not, I would rather leave the code as is since the required Map.Entry syntax is rather verbose. AFAIUI Angela already reverted some of these changes.

More generally, unless there are obvious correctness, performance or other clear benefits to an improvement like this, the exact code patterns are often a matter of style and personal preference. In such cases I'd leave it up to the original author to decide what the code should look like.


      was (Author: jukkaz):
    The benefit of that change is improved iteration performance, but are any of these cases things where performance boost is notable or even measurable? If not, I would rather leave the code as is since the required Map.Entry syntax is rather verbose. AFAIUI Angela already reverted some of these changes.

More generally, unless there are obvious correctness, performance or other clear benefits to an improvement like this, the exact code patterns are often a matter of style and personal preference. In such cases I'd leave it up to the original author to decide what the code should look like.

  
> Various places do map lookups in loop instead of using entrySet iterator
> ------------------------------------------------------------------------
>
>                 Key: JCR-2929
>                 URL: https://issues.apache.org/jira/browse/JCR-2929
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-core
>    Affects Versions: 2.2.4
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 2.2.5
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Various places loop over a keyset iterator and do a map look up each time thru the loop, I plan to convert these places to use an entryset iterator to avoid this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira