RXML run errors and <insert />

Working with a site that has many RXML <insert /> tags to build blocks of nested code. It all works nicely, but I noticed this evening how much the RXML "run errors" thrown by missing include/insert files can slow down the parse. Presumably because it has to write to the debug log ... Anyway, an example (from my laptop's Roxen 4.0.325 on OSX): Original code - from 0.2sec down to 0.075sec:

<comment>+++ INCLUDE users_prefs_config.inc +++</comment> <eval><insert file="config/users_prefs_config.inc"/></eval> <comment>+++ INCLUDE users_prefs NAV +++</comment> <if not variable="form.template is no" or match="&form.display_nav; is no"> <eval><insert file="mod_users_prefs/includes/users_prefs_nav.inc" /></eval> </if>

Faster code - close to 0.004sec:

<comment>+++ INCLUDE users_prefs_config.inc +++</comment> <if exists="config/users_prefs_config.inc"> <eval><insert file="config/users_prefs_config.inc"/></eval> </if> <comment>+++ INCLUDE users_prefs NAV +++</comment> <if not variable="form.template is no" or match="&form.display_nav; is no"> <if exists="mod_users_prefs/includes/users_prefs_nav.inc"> <eval><insert file="mod_users_prefs/includes/users_prefs_nav.inc" /></eval> </if> </if>

Only noticed this when "Show RXML run errors" in the main RXML parser was turned on. Across a big site (especially one that uses lots of these insert tags) this could really add up. I dunno how many inserts this particular site uses on a single page, but it's definitely averaging above a dozen - this code is really getting Roxen to work for its money :) My idea, which I'll try once I finish my work for the day, is to just define an <if exists><eval><insert> <///> container that will automate the speed boost ...