Summary: Talk page for PageGenerationTime.
Maintainer: Anno
Users: +2 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.


PHP5.5 Compatibility Issue

M. Denning, 20170729: Ruleset is throwing the following compatibility error. Please, can this be addressed ASAP? Base site is and WebMaster contact is at the bottom. Thanks!

GenerationTime   fulltext    B>=    ! file: /cookbook/generationtime.php, line: 2, pat: /\(:GenerationTime:\)/e
Update: I have updated line 2
FROMMarkup('GenerationTime', 'fulltext', '/\(:GenerationTime:\)/e',"GenerationTime()");
TOMarkup_e('GenerationTime', 'fulltext', '/\(:GenerationTime:\)/',"GenerationTime()");
TakeAway:This seems to have taken away the error generated in Rule Table.
AfterThought:However, I would still be more comfortable if I obtained positive word
from the other developers that this was the only updated necessary.

The above works for PHP 5.5; for it to also work for PHP 7.2, change it to Markup('GenerationTime', 'fulltext', '/\(:GenerationTime:\)/',"GenerationTime"); that is remove "_e" from "Markup_e" and remove the last "()". --Petko July 31, 2017, at 03:29 AM

Usage Question

Hi there, how do you use the generationtime.php within the template? (where the "powered by pmwiki" is?)

What would be a good value? Does the measured time show the time, the server need to generate the page, or pmwiki itself? What do values between 2.5 and 4 seconds show? Do I have a slow or fast "installation"???
Peter May 06, 2005, at 12:47 AM

The time is measured from loading the config.php file (which is one of the first things into the execution of the script) until loading the template file (which is one of the last things). So the time is an approximate measure of how long the script pmwiki.php needs to create the page.
2-4 seconds is rather slow.
On our site, which is on a shared server, it is considerably faster.

Have you got many extra cookbook things etc. loaded? I'm getting horrid execution times (2-3 s) and I don't know what to do to make things run more smoothly.

Sometimes I have execution times exceeding 5-10 seconds. Indeed, I have something around 13 cookbook things loaded, defining a lot of variables new depending to my (3) Wiki-Farms (titles, search-excludes etc.) and run my wiki like a cms with a login; and using some "if cases" to show up links only if someone is logged in. Does it eat up so much performance? What I have noticed is that includes (pages for sidebars, special noteblocks etc.) slow down the performance significant. As mentioned, some of these "if cases" are defined within the included pages, maybe this is the point. But, to give respect to pmwiki: my hoster seems to have problems with his performance too. There are moments, my wiki-execution-times are lower than 2 or 1,5 seconds - and sometimes (the same page) higher than 10-15 seconds. There is no rule to see.
Peter May 16, 2005, at 11:16 AM

Talk page for the PageGenerationTime recipe (users).