[Pmwiki-users] PHP Question: Storing Function Address in $SquareBrackets[[]]
Greg Morgan
Cybie
Tue Apr 6 21:01:57 CDT 2004
Steven Leite wrote:
> Some add-on's are fairly lengthy, take up processing power, memory,
> and time to execute. I wonder if there might be a way to have an
> add-on execute ONLY if called to do so. Currently, I believe most of
> the include_once("script.php") scripts get executed regardless
> of whether they are used on the page or not. If you have a lot of
> add-on's running, this can slow down the system quite a bit.
>
> One possible solution is creating a PageName.php script in your local/
> directory, and putting the include_once("script.php") line only in the
> Groups/Pages you need it.
You can get around this by including the features you want in per-group
or per-page configuration files. i.e. If you know calendars are only
used in the "Foo" group, you could put the include for calendars only
in Foo.php. One potential snag in examining wikitext to see which
add-ons are needed is that it may quickly reach a point of diminishing
returns where the CPU/RAM needed to check to see if an add-on is needed
is equal to or greater than what it takes to just load the add-on. :)
Though it does give me an idea for my XML-RPC add-on. I could see
putting in code so that if it detects an RPC connection only then does
it load the rest of the RPC code... This would be worth it since my
add-on not only loads itself, but also loads the PEAR XML-RPC libraries.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://contra.vosn.net/pipermail/pmwiki-users_pmichaud.com/attachments/20040406/dc4d1202/attachment.htm
More information about the pmwiki-users
mailing list