You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Rik van der Kleij (JIRA)" <ji...@apache.org> on 2008/08/01 07:50:31 UTC

[jira] Created: (WICKET-1766) Method size() of a data provider is invoked twice.

Method size() of a data provider is invoked twice.
--------------------------------------------------

                 Key: WICKET-1766
                 URL: https://issues.apache.org/jira/browse/WICKET-1766
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.4
         Environment: Ubuntu
            Reporter: Rik van der Kleij
            Priority: Minor
             Fix For: 1.3.5


Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Rik van der Kleij (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619873#action_12619873 ] 

Rik van der Kleij commented on WICKET-1766:
-------------------------------------------

OK, I got it. Some misperception on mine side about when isVisible() is called. 

Johan, you mention that "the table is rendered again". I assume that within one request rendering is always done one time, first security check and then rendering.

Thanks Igor and Johan.

It's only a pity that in most cases clearing the cache is not necessary because number of items is not changed. Normally size() queries the database so it will increase the response time.




> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619854#action_12619854 ] 

Johan Compagner commented on WICKET-1766:
-----------------------------------------

huh?

No the first call to isVisible() checks if we can call the onclick event on it yes or now.
It can call it because the table says i am visible at this time.. (rowcount > 0)

Then in the onclick you remove it and then the table is rendered again..
But now the table is NOT rendered because the isVisible() will now return false because you deleted the row in the onclick and rowcount == 0
Rowcount couldnt be cached because then we had a problem that the table says it is visible and wants to render 1 row that isnt there.

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619904#action_12619904 ] 

Igor Vaynberg commented on WICKET-1766:
---------------------------------------

well, there you go. you have tied visibility to rowcount yourself...

if you really do not want the double query and are ok with inconsistent data then you can cache the size yourself in your dataprovider and clear it in dataprovider.detach().

by default, i think the framework should work as it does now and avoid any chance of inconsistency - leave the optimizations up to the developer.

shall we close this issue?

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619880#action_12619880 ] 

Igor Vaynberg commented on WICKET-1766:
---------------------------------------

well, like i said, i do not think that the second query happens by default, only if you yourself somehow tie visibility to rowcount

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Updated: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner updated WICKET-1766:
------------------------------------

    Assignee: Igor Vaynberg

size() can be called many times i guess
Just cach the results and release it in detach.
Maybe igor has more to say about this..

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.5
>
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619789#action_12619789 ] 

Igor Vaynberg commented on WICKET-1766:
---------------------------------------

well, in order to implement those checks we need to access the size of the current dataset...i dont remember if security was the exact reason, i do remember that we had to access size() before any onclick was called...

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.5
>
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Rik van der Kleij (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619899#action_12619899 ] 

Rik van der Kleij commented on WICKET-1766:
-------------------------------------------

Our code does not tie visibility to rowcount();

We are adding a navigation toolbar to the data table. The navigation toolbar overrides isVisible() and invokes indirectly getRowCount(). That also corresponds with mine experience that size() was invoked twice when using the navigation links. 

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Erik van Oosten (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619000#action_12619000 ] 

Erik van Oosten commented on WICKET-1766:
-----------------------------------------

Johan, your previous remark is not directly related to the problem. When detach is called, the data provider must (well should) clear its size cache.

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.5
>
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619793#action_12619793 ] 

Igor Vaynberg commented on WICKET-1766:
---------------------------------------

ok, so i found the commit message for this change:

Revision: 572505
Author: ivaynberg
Date: 9/3/07 9:03 PM
Comment:
clear cached item count before render. this value might be cached before render is started - for example when visibility of something is checked and getitemscount() is called - but the items might change between then and render time so it is not safe to cache it during that time period

and now i more clearly remember what happened. a user overrode isvisible() { return getrowcount()>0; }. when wicket processes a callback it makes sure that the component and its hierarchy is visible all the way up to the page (security check, you shouldnt be able to click a link that is not visible...), which involves calling isivisible() on each member of the hierarchy, which in turn caused the item count to be cached incorrectly.

the safest and simplest solution was to always clear the cache in onbeforerender(). now, i do not believe there is anything in wicket itself that will cause the size to be loaded before onbeforerender() is called, unless you do it yourself by overriding something like isvisible() and doing something in there that causes the size to be queried.

does this clear things up a bit?

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Rik van der Kleij (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619787#action_12619787 ] 

Rik van der Kleij commented on WICKET-1766:
-------------------------------------------

Hi Igor,

Thanks for your explanation.

I do not understand the situation completely. It can be mine lack of how Wicket works internally but I have some remarks about the situation you describe.

You describe a situation in which size becomes incorrect but after 2.1 in 4 size is accessed again so it will retrieve a new value. Also iterator() is doing the real work. I can imagine that size() is used for creating the navigation links.

Size is called before onclick (step 1). You write that that is unavoidable but to me it seems that size has two different functions, getting the total number of items and performing security checks. Separation of concerns.

Rik
 

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.5
>
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619762#action_12619762 ] 

Igor Vaynberg commented on WICKET-1766:
---------------------------------------

the detach is called twice because a callback(onclick) is invoked. this happens because inside onclick it is possible to modify the data of the table and thus size can become incorrect.

consider this situation:

1. size is called and cached
2. onclick called
  2.1 row added to the database
3. size cache is cleared
4. size is accessed and cached again during table render
5. table redrawn

when step 5 completes the new row will be missing because datatable has cached size() before step 2 added the new row.

step 1 is also unavoidable because it is involved in such things as security checks of the onclick handler, etc.

i am writing this from memory, but i remember we added step 3 explicitly because caching size before onclick was causing this exact problem.


> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.5
>
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618979#action_12618979 ] 

Johan Compagner commented on WICKET-1766:
-----------------------------------------

i think we will never guarantee that we will not call it more then once
I even think that we in wicket should cache it as little as possible and call size() as much as possible

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.5
>
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Rik van der Kleij (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618952#action_12618952 ] 

Rik van der Kleij commented on WICKET-1766:
-------------------------------------------

The result of size() is already cached inside Wicket. I see that this cache is hit many times. Problem is that "in the middle" of the request this cache is cleared by Wicket. This is triggered by detach on the data table.

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.5
>
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Closed: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Rik van der Kleij (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rik van der Kleij closed WICKET-1766.
-------------------------------------

    Resolution: Won't Fix

Reason is clear. Thanks Igor.

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Rik van der Kleij (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619820#action_12619820 ] 

Rik van der Kleij commented on WICKET-1766:
-------------------------------------------

Yes, I see the problem but I don't understand the solution. Consider the situation that during isVisible(return getRowCount()>0) 1 item exists. After that the only one is removed before rendering. So the table is visible but contains no item.

To mine opinion it is better to have a consistent state than a ambiguous state during one request. Cache one time for a request. Data can always change so you have to take a snapshot in time.



> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Updated: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-1766:
----------------------------------

    Fix Version/s:     (was: 1.3.5)

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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


[jira] Commented: (WICKET-1766) Method size() of a data provider is invoked twice.

Posted by "Rik van der Kleij (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619001#action_12619001 ] 

Rik van der Kleij commented on WICKET-1766:
-------------------------------------------

Thanks Erik, but why is the detach, in this case, called two times.

> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
>                 Key: WICKET-1766
>                 URL: https://issues.apache.org/jira/browse/WICKET-1766
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Ubuntu
>            Reporter: Rik van der Kleij
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.5
>
>
> Method size() of a data provider is invoked twice during one request. This happens when navigating to a next or latest page in a data table. During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Implementations of size() normally query the database so it will slow down the performance.

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