Is it a bad practice do use a lot of auto importing ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it a bad practice do use a lot of auto importing ?

Albert Kam
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.

--
Do not pursue the past. Do not lose yourself in the future.
The past no longer is. The future has not yet come.
Looking deeply at life as it is in the very here and now,
the practitioner dwells in stability and freedom.
(Thich Nhat Hanh)

------------------------------------------------------------------------------
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
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|

Re: Is it a bad practice do use a lot of auto importing ?

Daniel Dekany
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
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user