Currently, the parser considers all #ifexist calls as an "expensive" call. The problem occurs when you have a page which includes a template with a single #ifexist call several times. The page checked for existence is always the same but the total function call is multiplied by the number of times the template is included.
A solution would be to cache #ifexist results (and other expensive functions') and use them, without incrementing the expensive function call counter.
Version: unspecified
Severity: minor