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 02: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) |
- /mm/dd my event name
- 05/04/2007 Chris
- 1007/05/26 Nice Calendar :)
- 19/04/2007 stpeterkomet
- 2007 04 03 daniels verjaardag
- 2007-01-01 Tims Test
- 2007-02-15 My very special event
- 2007-03-05 test event two
- 2007-03-30 My very special event
- 2007-04-05 Some Event
- 2007-04-19 test 19th april
- 2007-04-19 Test Florian
- 2007-04-25 March for rights
- 2007-05-19 DIMON
- 2007-06-01 Test Event
- 2007-06-03 Project Alpha
- 2007-06-06 London Wiki Wednesday
- 2007-06-06 Meeting in Paris
- 2007-06-09 My Vacation Day
- 2007-06-21 boo waz here
- 2007-07-13 Friday 13th
- 2007-07-15 Baiardi
- 2007-07-18 EPAF
- 2007-07-22 Jocs especials a la Trinitat
- 2007-08-01 Masterplan: World domination
- 2007-08-02 mew
- 2007-08-05 shit happens
- 2007-08-10 birthdaytest
- 2007-08-10 iso8601test
- 2007-08-13 testing
- 2007-08-22 The Birthday Party
- 2007-08-23 testing
- 2007-08-24 jehhu
- 2007-08-29 Workshop
- 2007-08-30 Installation Calendar in personal wiki
- 2007-08-31 19:00 Vorstandssitzung
- 2007-09-01 ABC Birthday
- 2007-09-05 Out of office
- 2007-09-06me me me
- 2007-09-15 my evers
- 2007-09-20 Tsotha-Lanti meets Britney Spears
- 2007-09-21 Day after tomorrow
- 2007-09-22 test
- 2007-09-22 Ward off the eels
- 2007-09-28 Cours
- 2007-09-28 my birthday; send me many gifts!
- 2007-09-29 Viajó Ana Feli a USA
- 2007-09-30 Another quick test
- 2007-09-30 Just a check
- 2007-10-17 milestone - tests completed
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 }}