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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to