You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2011/03/24 03:50:05 UTC
[jira] [Created] (JCR-2929) Various places do map lookups in loop
instead of using entrySet iterator
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
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
[jira] [Issue Comment Edited] (JCR-2929) Various places do map
lookups in loop instead of using entrySet iterator
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Resolved] (JCR-2929) Various places do map lookups in loop
instead of using entrySet iterator
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius resolved JCR-2929.
-------------------------------
Resolution: Fixed
> 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
[jira] [Commented] (JCR-2929) Various places do map lookups in loop
instead of using entrySet iterator
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010664#comment-13010664 ]
Dave Brosius commented on JCR-2929:
-----------------------------------
ok, sorry.
> 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
[jira] [Commented] (JCR-2929) Various places do map lookups in loop
instead of using entrySet iterator
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010544#comment-13010544 ]
Dave Brosius commented on JCR-2929:
-----------------------------------
Committed revision 1084832
> 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
[jira] [Commented] (JCR-2929) Various places do map lookups in loop
instead of using entrySet iterator
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010652#comment-13010652 ]
Jukka Zitting commented on JCR-2929:
------------------------------------
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
[jira] [Updated] (JCR-2929) Various places do map lookups in loop
instead of using entrySet iterator
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-2929:
-------------------------------
Fix Version/s: (was: 2.2.5)
2.3.0
> 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.3.0
>
> 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