Python template strings look interesting. That's the kind of simple
string replacement I was thinking about. Could be worth testing and it
seems to be included in version 2.5. I am new to Python and have
mostly programmed in Java for many years, but when I started using GAE
only Python was available. Python is actually quite nice for web
applications. If I develop a new GAE application maybe I will choose
Python again instead of Java.

I don't think it would make much difference to the cold start time,
but could improve the general performance a little bit.

On Feb 23, 6:23 am, Robert Kluin <[email protected]> wrote:
> Mako is not included, but it is easy to include yourself.  Just grab a
> copy (http://www.makotemplates.org/), then include the mako directory,
> from under lib, inside in the root of your app.
>
> If you are just needing some simplistic substitutions you could always
> look at Python string 
> templates:http://docs.python.org/library/string.html#template-strings.   I 
> would
> probably not do anything very involved with them, but for returning a
> simply status line or something similar they might be work.
>
> Robert
>
> On Mon, Feb 22, 2010 at 11:57 PM, Anders <[email protected]> wrote:
> > But is Mako included in GAE? I use the Django version that's included
> > in GAE.
>
> > It would be fun, although likely unnecessary to write my own template
> > code. I would then only use one template expression, such as
> > [[ name ]] and then do a simple, lightning-fast string replacement of
> > these expressions in the template. No if statements, no for loops or
> > anything fancy like that. :-)
>
> > On Feb 23, 5:15 am, Robert Kluin <[email protected]> wrote:
> >> Hey Andres,
> >>    If you are only using Django for templates, you might consider
> >> looking into other template systems.  We have been using Mako and are
> >> very happy with it.
>
> >>   And I _think_ the answer to your question is that the framework is
> >> loaded 100 times.  That is just a guess based on my understanding from
> >> other posts.
>
> >> Robert
>
> >> On Mon, Feb 22, 2010 at 10:51 PM, Anders <[email protected]> wrote:
> >> > Yikes, more than 1000 files sounds pretty big. At least for a template
> >> > engine. Maybe Django is capable of a lot of stuff. I only use a few
> >> > very simple template statements. It would be fairly easy for me to
> >> > replace Django with some manual much more lightweight code, but on the
> >> > other hand, the Django performance is fast when my application is
> >> > loaded, and I still doubt that Django has much to do with the long
> >> > delays during cold starts. The same with JSP. And why would Django, or
> >> > code for rendering JSP, need to be loaded every time for each
> >> > application? Let's say that one server has 100 applications loaded
> >> > using Django. Does this mean that the same Django (large) code is
> >> > duplicated 100 times in the server?!
>
> >> > On Feb 23, 1:02 am, Wooble <[email protected]> wrote:
> >> >> On Feb 22, 12:42 pm, Anders <[email protected]> wrote:
>
> >> >> > And that Django can cause several seconds of extra delay doesn't sound
> >> >> > plausible.
>
> >> >> In the early days of App Engine, there were complaints that django
> >> >> couldn't be used because of the 1000 file limit.  This is pretty much
> >> >> the definition of a bloated framework.
>
> >> > --
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "Google App Engine" group.
> >> > To post to this group, send email to [email protected].
> >> > To unsubscribe from this group, send email to 
> >> > [email protected].
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/google-appengine?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to