How does TWiki know to call a particular plugin - from %VARIABLES% on a page or... ?
--
DavidLeBlanc - 18 Mar 2002
All Plugins are called. The first to process a given variable wins.
--
JohnTalintyre - 18 Mar 2002
Just a thought, but why not have the init routine of a plugin return a list/dictionary of those variables it will process to avoid all that overhead?
Not being a Perl programmer to speak of (I can follow a camel, but not lead it

) I would assume one could do something like call (varhandler[varname]) where varhandler is the aforementioned dictionary and this would cause the hanlder that's the value of the key "varname" to be called?
--
DavidLeBlanc - 18 Mar 2002
This adds some complexity to the Plugin API (each plugin must register all the syntax that it handles - in some cases this is not just a variable, e.g. for custom plugins that enhance TWiki syntax, such as one I did to map
bug:1234 to a bug tracking link). Also, it's not clear that this will really speed things up. It would be good to do some
PerformanceAnalysis on plugins to verify that there really is a significant slowdown here - typically, there is just an s/foo/bar/ for each plugin that detects the text it must handle.
I suspect that we'd get a much bigger speedup from making it easier to get
ModPerl and
SpeedyCGI working - the latter is suitable for
TWikiOnWebHostingSites, as well as corporate intranet servers where you aren't root, since it doesn't require an Apache module.
--
RichardDonkin - 19 Mar 2002