On Sat, Jan 31, 2009 at 1:28 PM, Alex mrzmanwiki@gmail.com wrote:
Domas Mituzas wrote:
So, a checklist what can be done ( simple to complex )
[ ] - Simplification of {{cite}}
Short of significant improvements to the parser or requireing people to ask Domas before editing the template, I can
[ ] - Separate cache for Cite, to avoid reparsing on minor edits, that don't involve citations. I have no idea how much this would win, but there is theoretical chance of stripping 1% or so. ;) [ ] - Offload some templates like {{cite}} to actual PHP extensions (can of worms, but, oh well, can be standardized process too)
I've actually considered something like this in the past, basically creating a Cite 2.0 extension, where all the main cite options would be in the <ref> tags themselves with pre-defined "templates" written in PHP for web citations, book citations, etc.; this would greatly reduce the amount of stuff that needs to be done using the Cite wiki-templates and run through the parser.
You would have something like:
<ref author="Foo" title="Bar" type="book">Pages 1-10</ref>
Any parameters in the ref tag would be converted to HTML output using the "book" template in the extension rather than a thousand parser functions in some meta-template, and only the content of the tag (the page numbers in this case) would have to be run through the parser, so it would also be backwards-compatible with the current templates until they can all be migrated.
The main downside to this is that it requires someone to file a Bugzilla request every time a template needs changing.
What about throwing them in MediaWiki: space, similar to editnotices? At least then they could be cached to hell and back in the message cache.
-Chad