[
https://issues.apache.org/jira/browse/TAP5-2478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15480451#comment-15480451
]
Michael Mikhulya commented on TAP5-2478:
----------------------------------------
Both me and [~m.fedotova] don't work anymore on project which was used for
performance measurements. So we can't recheck new patch. I believe there
shouldn't be any difference with default method in interface.
[~jkemnade], could you please commit changes for tapesry-core at least?
> 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)