I don't really understand why using #ifexists is considered more expensive than including a template--it seems like the latter would be more expensive. The first just checks if the file is there, the second actually loads in and parses the file, which it can only do if the file exists. Perhaps because #ifexists is adding non-existent pages to the Wanted Pages, etc.? Is there really not a cheaper version to do the same, or could it be done cheaper by a Lua module? I'm thinking of very common issues like adding links that may or may not have an icon, where the template would only display the icon if it existed, and would start displaying it if someone uploaded one with the same name as the link.
How expensive are "expensive" functions? I'm scared to use any of them, though I see we're allowed to use up to 100 per page (obviously including templates, etc.), and my understanding is if you have a template without parameters that uses one, it would rarely execute anyway as the template output would be cached.