2008/2/20, Saminda Abeyruwan <[EMAIL PROTECTED]>: > https://issues.apache.org/struts/browse/TILES-254
Please attach a patch to this issue if you want to make it fixed faster. > Is there any particular reason to re-load Definitions for the very first > request, [UrlDefinitionsFactory line 167]. Since I'm not applying any filter > at all, reloading defs for the very first request is very expensive. Yes, and no. The reason why definitions loading for locale-related definitions happens at the very first request is that we don't know if there are "tiles-defs_XX.xml" files, until we try them when requested. The problem we (committers) do not know how to list all the "tiles-defs_*.xml" files, at least not in a portable manner. > In order to not to make the initial request take a lot of time to process > the already processed defs (which is already processed in deployment time), > now I've commented out everything after line 227 to 271. Still it works and > all the test passes. I see: you are in a particular (not default, just like mine ;-) ) locale and you see the same definitions parsed twice, right? Well, the reason is that for locale-specific definitions, the double parsing seemed the best solution. The other solution would be to store the "unresolved" (i.e. without calling the "resolveInheritance" methods in DefinitionsImpl) definitions. But that means more memory to use for all the time of the webapp running, and only for a limited number of requests. If you find a better solution please let us know :-) Ciao Antonio
