tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-2335) Decrease number of operations with HashMap #2
Date Fri, 01 Aug 2014 19:53:40 GMT

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

ASF subversion and git services commented on TAP5-2335:
-------------------------------------------------------

Commit b0f280657b939fb1efb91cfc4c7d6e2560df19fc in tapestry-5's branch refs/heads/master from
[~hlship]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=b0f2806 ]

TAP5-2335: Spot-optimization to the NamedSet collection


> Decrease number of operations with HashMap #2
> ---------------------------------------------
>
>                 Key: TAP5-2335
>                 URL: https://issues.apache.org/jira/browse/TAP5-2335
>             Project: Tapestry 5
>          Issue Type: Improvement
>            Reporter: Michael Mikhulya
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.4
>
>         Attachments: 0001-TAP5-2335-Decrease-number-of-operations-with-HashMap.patch
>
>
> During profiling of tapestry framework I found that HashMap is actively used in following
code:
> {code:title=NamedSet.java}
> public void eachValue(Worker<T> worker)
>     {
>         F.flow(getValues()).each(worker);
>     }
> {code}
> Here HashSet (which internally uses HashMap) is created inside getValues() only to iterate
over it.
> I changed code to use ArrayList instead of HashSet.
> With following patch time per request decreased on 3.5 ms (7.4% of overall time). Measurements
were done with apache benchmark on a real application after warm up phase.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message