High performance with stateful TemplateDirectiveModel
Jerker Klang <[email protected]> Mon, 15 Dec 2014 15:42:19 +0700
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Hello all, I'd thinking about how I could attain template "compile time generation" optimizations the best way. Or maybe I'm just on the wrong track. Any comments would be helpful. I'm using Freemarker as html template engine. In that html I have sometimes a few <script>-tags containing javascript. The javascript could be optimized with one of numerous available optimization and minification tools available. I was thinking about doing a TemplateDirectiveModel that on the first run optimizes that code and any calls thereafter only returns the optimized part. Is this a good way to attain my goal (doing early, close to only once, expensive template translation). Of course the code within has to be written so it doesn't depend on anything that makes the code dynamic on each rendering. As I said, any feedback on my thoughts would be greatly appreciated! Have a great day! //Jerker ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk