[pmwiki-users] Problem with page iterations

Patrick R. Michaud pmichaud at pobox.com
Fri Oct 6 19:56:23 CDT 2006


On Fri, Oct 06, 2006 at 04:27:02PM -0400, Crisses wrote:
>    When I try to add more than maybe 15 pages to the site at a time, it times
>    out (30 seconds) in pmwiki.php somewhere.  (re: UpdatePage, creating new
>    pages).
>    I'm sure it's a combination -- 15 pages being saved is REALLY 30, because
>    FASTData is ALSO saving pages.

There are two parts that take a long time in saving pages:  blocklists
and computing page history.  Computing page history can take a
really long time and use up a lot of memory on long pages, so
it might be worthwhile to try the Cookbook.SysDiff recipe and
let an external diff(1) program handle computing the page history.

>    Is there some way I can have the pages created as part of the
>    register_shutdown_function?  

Yes, it can be done.  Essentially you just call 
register_shutdown_function with the name of a function you'd 
like to have called (i.e., the one that will create the 30
pages) and any arguments to that function.

One thing to watch out for is that sometimes the current
directory changes before the shutdown functions are called,
so one of the arguments that needs to be passed to your
custom function is the name of the current directory
(via getcwd() ), and your function should switch to that
directory prior to calling UpdatePage().

You'll probably also want to disable the timeout
(I forget the PHP function for this).

Pm




More information about the pmwiki-users mailing list