[pmwiki-users] mySQL backend and sort of an OT

Petko Yotov 5ko at 5ko.fr
Sun Jan 15 03:41:41 CST 2012


On Saturday 14 January 2012 04:59:49, Carlos AB wrote :
> clearly, I would also have to change pagelist to take full advantage
> of a database engine.

This is possible in recent versions of PmWiki, you can insert or disable 
filter functions, for example:

  $PageListFilters['PageListSort'] = -1;    # disable the core pagelist sort
  $PageListFilters['MyPageListSort'] = 900; # add a custom pagelist sort


> To not abandon the idea of using PmWiki for the project and be able to
> still use pagelist, can I restrict it in a way that it can only list
> pages in one group or a max of  5 or 10 groups, in each time it is
> used? With that I would not lose the functionality of pagelist and
> could work on other solutions for searching the whole site.

The current function listing pages scans wiki.d to get _all_ page names, then 
discards those that do not conform to the requested pattern (group=U2*,Bono*). 
With millions of files, this will take time and memory. In that case it may be 
better to use

  trail={*$Group}.RecentChanges if="exists {=$FullName}" order=name

instead of group={*$Group}.

With the $RecentChangesFmt variable you can create custom trails or menus. 
When a page is saved, it is added to some trail page which is later used by a 
pagelist. This should be faster and easier for the server than scanning a 
directory with millions of files.

> Other than that, the number of artists will result in more or less
> 50.000 groups, a per group wiki.d and a restricted pagelist to a max
> of 5 groups and maybe, just maybe, I won`t even need a mysql database
> plug-in, just a dedicated server and all types of caches enabled.
> 
> What comes to mind is a folder with 2M cache files.

You should estimate if PmWiki caches will be needed. If a single page is 
edited, because of the complexity of pagelists, includes and page variables, 
all HTML and pagelist cache is invalidated. If you have many repeated visits 
between two edits, then yes, the cache will be useful. If your wiki is edited 
many times per day, with few visitors, a cache may be invalidated too often to 
serve its purpose.

> Perhaps not using all 2M files from the start would be a good idea,

If you can have larger pages with more content, like several songs per page, 
you will have fewer pages. You could use SectionEdit or a similar recipe to 
edit them, possibly hide/toggle the sections that are not requested, etc.

One of the largest PmWiki installations, a student wiki at the university 
where Pm worked, has thousands of wikigroups, one for every student. But it 
uses neither searches nor pagelists. The students add links to their pages in 
their own sidebars.

Petko



More information about the pmwiki-users mailing list