Last modified: 2012-01-29 03:38:50 UTC
#ask is unnecessarily expanding default=, it should be deferring expansion like #if and other parser functions do. This means that for templates using something like: {{#ask: ...some query... | default= {{#ask: ...some fallback query... }} }} The second #ask is always executed, running unnecessary extra sql queries and affecting performance in cases where the first #ask does in fact have contents.
I agree. One thing I am curious about though, why is there a replacement of "_" against " " happening for the 'default' parameter? The 'default' parameter handling is happening in SMWResultPrinter class right now, perhaps it should be moved to the parser function since it is more like a basic feature of the parser function rather than a result format specific feature. Same for 'intro' and 'outro', which in addition should not be expanded in case we expand the 'default'.
+1. We should not expand stuff that's not used.