Re: Is it a bad practice do use a lot of auto importing ?
Daniel Dekany <[email protected]> Sat, 11 May 2013 13:45:19 +0200
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Saturday, May 11, 2013, 9:09:12 AM, Albert Kam wrote: > I wonder whether there are tradeoffs to use mostly auto imports rather than the manual imports ? > > I have this doubt since i notice that i have been doing auto import > a lot, even to the point that the imported ftl is only used by > another ftl, and is not likely to be used by other ftl-s in the future. Importing usually doesn't do a lot (most imports just define a bunch of macros and the templates are coming from the cache), but if you have many imported templates it can mean some slowdown. It had to be measured in the concrete application to find out it matters. Like if your page rendering consists of running many smaller templates as opposed to running one big template, I can imagine that it can become a performance issue. (BTW, I want to introduce lazy-importing (importing only when you are actually using the prefix for the fist time) in the future.) -- Thanks, Daniel Dekany ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may