[dokuwiki] Re: New Pagemove Plugin (Brainstorming)

  • From: Stefan Waidele <Stefan@xxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 22 Mar 2010 14:29:06 +0100

Hi,

Am 22.03.2010 13:41, schrieb Michael Klier:
[...]
        - it should provide the following options (all accessible via maybe a
          popup form prior to moving the page/ns):
                - fix backlinks (yes/no - default yes) - /not sure about that 
one/
                - move attached media (yes/no - default no)
                - move page history (yes/no - default yes)
                - delete original pages (yes/no - default yes)
                - create a redirect to the moved page (yes/no - default yes)

Looks to me that most of these tasks are pretty fast operations on the filesystem level - except the "backlink fixing", which in turn might be quite expensive depending on the size of the wiki.

Having that in mind, how about changing the order of the tasks:

* If the redirect is created before the backlinks are fixed, then the wiki itself should be in a workable state. * If the redirect is not desired, it can be removed after the backlink-fixing is complete

The actual fixing could be done in a background process which

  * reads _all_ the pending replacements from the queue
* visits each dokuwiki-page and replaces the links to _all_ pages moved since the last time the process started * removes the "move-lock" from the moved pages, so they can be relocated again.

When moving...

  * ...one page, this process is executed and all is fine
* ...several pages, this process ist started once for the first page (possible: with delay for the first couple of pages), and then again with the next batch, depending how fast the user moves the pages. * ...a whole namespace, the proces only runs once, replacing links to all the pages in the namespace in that single run.

So, if the wiki is large and or the server load is high (and the fixing takes longer), there is more potential to save time by processing more pagemoves in one swoop.

If the wiki is small or we have a fast, underused server, it does not really matter how often the replacement-task runs since it is quite fast.

Does this make sense?

Stefan
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: