[
https://issues.apache.org/jira/browse/TAP5-2478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15483357#comment-15483357
]
ASF subversion and git services commented on TAP5-2478:
-------------------------------------------------------
Commit 1a8f0864dd3632fdb911f59e3c9fc0a1d487c84e in tapestry-5's branch
refs/heads/master from [~jkemnade]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=1a8f086 ]
TAP5-2478: short-circuit in getIfExists if there is no active session
> Create getIfExists in SessionApplicationStatePersistenceStrategy
> ----------------------------------------------------------------
>
> Key: TAP5-2478
> URL: https://issues.apache.org/jira/browse/TAP5-2478
> Project: Tapestry 5
> Issue Type: Improvement
> Reporter: Maria Fedotova
> Labels: patch, perfomance
> Attachments:
> 0001-TAP5-2478-short-circuit-in-getIfExists-if-there-is-n.patch,
> TAP5-2478.patch, TAP5-2478_add.patch
>
>
> Instead of this code
> {code}
> public <T> T getIfExists(Class<T> ssoClass)
> {
> ApplicationStateAdapter<T> adapter = getAdapter(ssoClass);
> return adapter.exists() ? adapter.getOrCreate() : null;
> }
> {code}
> I've create function getIfExists
> {code}
> public <T> T getIfExists(Class<T> ssoClass)
> {
> return getAdapter(ssoClass).getIfExists();
> }
> {code}
> This patch increased requests per second on ~7% (from 24 to 26 on huge pages)
> Thank [~mihasik] for the idea.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)