Difference between revisions of "DPL Example 027"
From FollowTheScore
(total was missing) |
(better query to navigate to the end) |
||
Line 14: | Line 14: | ||
|debug=3 | |debug=3 | ||
| namespace = | | namespace = | ||
− | | | + | | category = Events |
| count = {%DPL_count:50%} | | count = {%DPL_count:50%} | ||
| resultsheader = ²{Extension DPL continue¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page={{FULLPAGENAME}}}²\n | | resultsheader = ²{Extension DPL continue¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page={{FULLPAGENAME}}}²\n | ||
Line 22: | Line 22: | ||
{{#dpl: | {{#dpl: | ||
| namespace = | | namespace = | ||
− | | | + | | category = Events |
| count = {%DPL_count:50%} | | count = {%DPL_count:50%} | ||
| resultsheader = ²{Extension DPL continue¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page={{FULLPAGENAME}}}²\n | | resultsheader = ²{Extension DPL continue¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page={{FULLPAGENAME}}}²\n | ||
| resultsfooter = ²{Extension DPL continue¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page={{FULLPAGENAME}}}² %DPLTIME%\n | | resultsfooter = ²{Extension DPL continue¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page={{FULLPAGENAME}}}² %DPLTIME%\n | ||
}}</nowiki></pre> | }}</nowiki></pre> |
Revision as of 01:56, 6 July 2009
back to list of examples
Optimum performance result scrolling for huge wikis
This page demonstrates how DPL can be used in really huge wikis like WIKIPEDIA to allow efficient scrolling through huge result sets. The approach ios very much straight forward:
- We use count=50
- When scrolling forward we use ascending order; when scrolling backward we internally use descending order but we reverse the result set for the user
- Each query takes a lower or an upper limit for the search as a selection criterion; This criterion is set by an URL parameter which is deducted from information of the previous query: each query passes the first and last page of its result set to a scroll helper template.
- The approach could be extended: The scroll helper could produce a set of fixed links for the initial letters; thus one could easily jump to A, B, C, ...
- For convenience we repeat the last page of a result set as the first page of the next result set.
- Note that adding %TOTALPAGES% to resultsheader or resultsfooter would lead to a SQL statement which might be less efficient as the database must each time calculate the total number of matching records ("SQL_CALC_FOUND_ROWS")
- The time spent within DPL is displayed at the bottom; usually it is below 30 msec.
startbacknext(50 listed / 125 left) |
- My very special event (2007/03/01)
- 2007/04/05 my event name
- 2007/03/29 Something is happening
- 2007 04 03 daniels verjaardag
- 2007/04/03 Daniels verjaardag
- 2007/04/16 my test event
- 2007/04/03 vacantion
- 2007/04/18 this events is still upcomng
- 2007/05/01 launch blogzapfel!
- 19/04/2007 stpeterkomet
- 2007/04/06 my event
- 2007/04/22 test1
- 2007/04/27 iloveEvents
- 2007/04/25 Hello from Japan
- 2007/04/25 DougTest
- 2007/06/03 June event
- 2007/06/01 some event
- 2007/04/26 some event
- 2007/04/28 中文
- 05/04/2007 Chris
- 2007/04/30 Mon événement
- 2007/04/30 Un autre événement
- 5/3/07 8PM new event
- 2007/05/03 my event name
- 2007/05/03 hghg
- 2007/05/05 hackeln
- 2007/05/03 Training Basketball Team
- 2007/05/07 take wife out for movie -- Spiderman?
- 2008/11/12 Test
- 207/05/10 Bolwing
- 2007/05/11 Calender Check
- 2007/05/25 algo
- 1007/05/26 Nice Calendar :)
- 2007/05/19 Update
- 2007/02/05 test test test
- 2007/05/09 WooHoo
- 2007/05/26 pvp
- 2007/06/05 Evenement maintenance
- 2007/05/31 Bladadadmam
- 2007/05/29 TEST EVENT
- YYYY/mm/dd my event name
- 2007/06/21 milestone 4
- 2007/06/07 Gaudium in Poing
- 2007/05/02 Sat Test
- 2007/06/04 en la fing
- 2007/06/06 Test
- 2007/06/22 test
- 2007/06/30 gave up to install this calendar
- 2007/06/09 Test by tao.li
- 2007/06/12 some other event
startbacknext(50 listed / 125 left) |
{{#dpl: | namespace = | category = Events | count = {%DPL_count:50%} | resultsheader = ²{Extension DPL continue¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page={{FULLPAGENAME}}}²\n | resultsfooter = ²{Extension DPL continue¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page={{FULLPAGENAME}}}² %DPLTIME%\n }}