tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Menard (JIRA)" <...@tapestry.apache.org>
Subject [jira] Commented: (TAPESTRY-2245) GridDataSource getAvailableRows() method called inefficiently
Date Sat, 08 Mar 2008 21:39:53 GMT

    [ https://issues.apache.org/jira/browse/TAPESTRY-2245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576621#action_12576621
] 

Kevin Menard commented on TAPESTRY-2245:
----------------------------------------

Maybe an application for the new @Once annotation.

> GridDataSource getAvailableRows() method called inefficiently
> -------------------------------------------------------------
>
>                 Key: TAPESTRY-2245
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2245
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.11
>            Reporter: Howard M. Lewis Ship
>
> The getAvailableRows() method is called multiple times while rendering the page.  This
is fine when it is just invoking size() on a List, but for a Hibernate query it is quite inefficient:
> [INFO] AppModule.TimingFilter Request time: 1 ms
> Hibernate: 
>     select
>         count(account0_.ACCOUNT_ID) as col_0_0_ 
>     from
>         ACCOUNT account0_
> Hibernate: 
>     select
>         this_.ACCOUNT_ID as ACCOUNT1_0_0_,
>         this_.FIRST_NAME as FIRST2_0_0_,
>         this_.LAST_NAME as LAST3_0_0_,
>         this_.PASSWORD as PASSWORD0_0_,
>         this_.DATE_OF_BIRTH as DATE5_0_0_,
>         this_.COMMENTS as COMMENTS0_0_ 
>     from
>         ACCOUNT this_
> Hibernate: 
>     select
>         count(account0_.ACCOUNT_ID) as col_0_0_ 
>     from
>         ACCOUNT account0_
> Hibernate: 
>     select
>         count(account0_.ACCOUNT_ID) as col_0_0_ 
>     from
>         ACCOUNT account0_
> Hibernate: 
>     select
>         count(account0_.ACCOUNT_ID) as col_0_0_ 
>     from
>         ACCOUNT account0_
> Hibernate: 
>     select
>         count(account0_.ACCOUNT_ID) as col_0_0_ 
>     from
>         ACCOUNT account0_
> [INFO] AppModule.TimingFilter Request time: 147 ms
> [INFO] AppModule.TimingFilter Request time: 0 ms
> [INFO] AppModule.TimingFilter Request time: 0 ms
> Some care should be taken to ensure that the method is invoked once per request and the
value cached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message