Help:Using DynamicPageList Effectively
From Wikia Help
|
DynamicPageList can cause heavy server loads, slowing the entire site down. The following are tips on how to get around the problem.
First: Consider whether your DPL usage is necessary. If it's only used because it's "cool" you might be able to provide something equally cool to your users in the same space, such as a poll, calendar, embedded RSS feed, embedded video, and more.
Second: If you decide you must use it, let DPL cache results! Simply add this line to your DPL query:
allowcachedresults=true
For more details see the documentation at allowcachedresults
Use other tools for common DPL uses
- Creating simple category lists
- For creating simple category lists you might use the <categorytree> tag (documentation). For instance, to get a list of pages in the category 'Community' consider the following:
<categorytree mode="pages" hideroot=on>Community</categorytree>
- Creating page lists
- Use NewestPages to generate simple article lists by category or namespace.
- Random content
- Use RandomSelection
- Creating complex lists (category intersection with formatting, etc.)
- Consider using a robot to keep lists up to date. Robots are computer programs that edit wikis for people. You can find out more about writing robot programs at Wikipedia's 'creating a bot' page.
- Advanced uses
- For more advanced uses, please check that a more specialized extension is not available before using DPL. For example, instead of creating a calendar with DPL use one of the calendar extensions available. If you are unsure or don't see an extension you need, contact us and we'll be happy to help.
Additional tips for fast pageloads
- Construct and maintain small lists manually
- Store a DPL query in a low-traffic place, such as the Project namespace, and copy the results of the query to higher-traffic pages as needed.
- Never include DPL in the sidebar or sitenotice.
Things to avoid
Do not use DPL for:
- lists that do not need to be updated in real-time
- functions using "randomcount"
- they can't be cached
- DPL in templates that are used site-wide
- creates many DPL calls per page
- large queries
- don't display 500 results if 20 will do the job
- more than one or two queries per page
- your main page and other high traffic pages and articles
