tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maria Fedotova (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TAP5-2478) Create getIfExists in SessionApplicationStatePersistenceStrategy
Date Fri, 15 May 2015 05:40:00 GMT

     [ https://issues.apache.org/jira/browse/TAP5-2478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Maria Fedotova updated TAP5-2478:
---------------------------------
    Description: 
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 incresed requests per second on ~7% (from 24 to 26 on huge pages)
Thank [~mihasik] for the idea.

  was:
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 incresed requests per second on ~7% (from 24 to 26)
Thank [~mihasik] for the idea.


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

Mime
View raw message