So, what about included files? phpBB must keep a record of what templates are included in what other templates, otherwise, when you change a template that had been included in another template, the other template wouldn't change.
The viewforum template, for example, must include overall_header, overall_footer and the forum jump box, and could feasibly include any number of other templates. when you modify one of these templates, this template must have to be checked on every page view of viewforum (although I suppose if this process was too intense you could make it happen only, say, once every four or five seconds at the most), and this would require a record somewhere of every template that is stored within viewforum, which either means it's in the database (in which case there's an extra query on the page) or you've been really
sneaky and put the info in the compiled template. That or you've just not done it, which would be a bit p00p :/
So, how've you done it? Tell us!