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

Hudson commented on TAP5-2478:
------------------------------

FAILURE: Integrated in Jenkins build tapestry-trunk-freestyle #1596 (See 
[https://builds.apache.org/job/tapestry-trunk-freestyle/1596/])
TAP5-2478: short-circuit in getIfExists if there is no active session 
(jochen.kemnade: rev 1a8f0864dd3632fdb911f59e3c9fc0a1d487c84e)
* (edit) 
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionApplicationStatePersistenceStrategy.java
* (edit) 
tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ApplicationStateManagerImplTest.java
* (edit) 
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ApplicationStateManagerImpl.java
* (edit) 
tapestry-core/src/main/java/org/apache/tapestry5/services/ApplicationStatePersistenceStrategy.java
* (edit) 
tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java


> 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)

Reply via email to