You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "bernard (JIRA)" <ji...@apache.org> on 2009/10/19 21:31:59 UTC
[jira] Created: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Pageable Views call IDataProvider.size() more than once
-------------------------------------------------------
Key: WICKET-2532
URL: https://issues.apache.org/jira/browse/WICKET-2532
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4.1
Environment: All
Reporter: bernard
IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
How to reproduce:
Drop in the attached files into the Wicket examples application and run:
repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2532:
----------------------------------
Fix Version/s: 1.5-M3
(was: 1.5-M2)
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Fix For: 1.5-M3
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Thomerson updated WICKET-2532:
-------------------------------------
Fix Version/s: (was: 1.5-M3)
1.5-M4
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Fix For: 1.5-M4
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922296#action_12922296 ]
Jeremy Thomerson commented on WICKET-2532:
------------------------------------------
just to add a comment here. the inmethod grid allows tables of unknown size. we could look at how it does it, although there are significant differences between the two.
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Fix For: 1.5-M3
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831029#action_12831029 ]
Igor Vaynberg commented on WICKET-2532:
---------------------------------------
we will try to work on it. unfortunately a "navigate to last page" link is a very commonly used feature so i dont think it is possible to remove.
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Fix For: 1.5-M1
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2532:
----------------------------------
Fix Version/s: 1.5-M2
(was: 1.5-M1)
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Fix For: 1.5-M2
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-2532.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.5-M1
1.4.7
Assignee: Igor Vaynberg
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Assignee: Igor Vaynberg
> Fix For: 1.4.7, 1.5-M1
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2532:
----------------------------------
Fix Version/s: (was: 1.4.7)
Assignee: (was: Igor Vaynberg)
Issue Type: Improvement (was: Bug)
there is no good way to do this without altering existing behavior, so moving to 1.5.
size() is only called twice when a navigation link is used to page through the table, so not that much overhead...
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Fix For: 1.5-M1
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922296#action_12922296 ]
Jeremy Thomerson edited comment on WICKET-2532 at 10/18/10 5:57 PM:
--------------------------------------------------------------------
just to add a comment here. the inmethod grid allows tables of unknown size. we could look at how it does it, although there are significant differences between the two.
also, see WICKET-579
was (Author: jthomerson):
just to add a comment here. the inmethod grid allows tables of unknown size. we could look at how it does it, although there are significant differences between the two.
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Fix For: 1.5-M3
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "bernard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
bernard updated WICKET-2532:
----------------------------
Attachment: ContactDataProviderTest.java
PagingPage.java
PagingPage.java, ContactDataProviderTest.java
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reopened WICKET-2532:
-----------------------------------
not as easy as i thought...this may need a bigger rework...
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Assignee: Igor Vaynberg
> Fix For: 1.4.7, 1.5-M1
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "bernard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831244#action_12831244 ]
bernard commented on WICKET-2532:
---------------------------------
Thanks very much.
Currently there is no sulution at all, and I would like to be humble with respect to what kind of possible solution of this problem.
Removing "navigate to last page" would definitely solve it but you might find better solutions, too.
What about letting the framework call iterator.hasNext() one more time even after the size() number is exhausted, pushing the dataprovider to fetch a new buffer and increase size? This would work only if Wicket would adjust to the new size, too.
If there was a parameter in the size() call, or callback that the DataProvider could call to find the requested page position that would be great.
Unfortunately this info must be available, and I found that
a) it isn't at the time of the first size() call which is the subject of the bug
b) the call I used to get the requested position called back into size() so I ended up with infinite recursion.
(This jira text box is one character wide on my Firefox 3.6, I can't see while I am typing)
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Fix For: 1.5-M1
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2532) Pageable Views call
IDataProvider.size() more than once
Posted by "bernard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830492#action_12830492 ]
bernard commented on WICKET-2532:
---------------------------------
Igor,
I stumbled over this when I tried to write a read-ahead buffering IDataProvider without separate count queries for resultsets that are (effectively) of unknown size. I could not do it, and this has nothing to do with this bug.
I think my attempts failed because iterator(int first, int count) is always called after size(), _and_ iterator.hasNext() is never called above the size limit.
That means in my case that if the user clicked on the last link of a paging navigator, then I was completely stuck without the chance to read ahead a new buffer from the database because the user was already on the last link and he would not get a chance to move beyond that. I was too late to increase size() because iterator.hasNext() was not called even though there was more data redy to be fetched into the next buffer.
The last page link seems to kill the whole idea. I was really frustrated because everything else worked.
Do you have any ideas whether this case could be supported in a future release?
> Pageable Views call IDataProvider.size() more than once
> -------------------------------------------------------
>
> Key: WICKET-2532
> URL: https://issues.apache.org/jira/browse/WICKET-2532
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.1
> Environment: All
> Reporter: bernard
> Fix For: 1.5-M1
>
> Attachments: ContactDataProviderTest.java, PagingPage.java
>
>
> IDataProvider.size() is typically an expensive database operation. It is called twice in typical Pageable View scenarios although Wicket makes attempts to avoid that. In addition, the first call is premature from the application perspective because it is made while the the requested page position is not yet known.
> How to reproduce:
> Drop in the attached files into the Wicket examples application and run:
> repeaters|Paging DataView Example - builds on previous to demonstrate paging and page navigation
> Otherwise I am running against a wall with IDataProvider.size() and AbstractPageableVew because I can't find any way to get the page position at the same time when IDataProvider.size() is called. Support of paging of results of unknows size is impossible without this information. Please refer to Google search results paging - that is the kind of paging we need.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.