Template compilation taking 6-7 minutes

25 views
Skip to first unread message

Harshdeep S Jawanda

unread,
Aug 7, 2014, 11:30:17 AM8/7/14
to Rythm Engine
I have an existing template base.tmpl.

There's a new template that I am trying out base-new.tmpl (at this point it's just plain HTML).

A page based on base.tmpl takes about 9-10 secs the first time, subsequent reloads are nearly instantaneous on my GAE development server.

base-new.tmpl (in same directory, same Rythm configuration file) takes 6-7 minutes the first time, subsequent reloads are nearly instantaneous (this template doesn't have any dynamic content as yet).

If I use a new instance of RythmEngine every time, the new template takes 6-7 minutes every time I reload the page. From this I am guessing that this is the template compile time.

Why is this new template taking so long to compile? The template is at http://pastebin.com/HPPLg8RE

Yes, this is an old, unsolved problem that I have come back to. All help is highly appreciated.

--
Regards,
Harshdeep S Jawanda

green

unread,
Aug 9, 2014, 7:54:09 AM8/9/14
to Rythm Engine
hmm... I have templates that are over 800 lines long and never take more than 10s to compile. there should be some other factor associated with that 6-7 mins.

On the other hand, creating new instance of RythmEngine is definitely NOT the way to use Rythm. One RythmEngine instance is suppose to be initialized at the application boot up and then manage all templates for one application. It doesn't make sense to create new RythmEngine instance for one render of a template at all


--
You received this message because you are subscribed to the Google Groups "rythmengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rythmengine...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harshdeep S Jawanda

unread,
Aug 9, 2014, 8:16:27 AM8/9/14
to green, Rythm Engine
Yes, I was just creating new instances of RythmEngine in a desperate attempt to understand the problem. Otherwise I use the RythmEngine with a Singleton pattern.
Reply all
Reply to author
Forward
0 new messages