Re: django template modules compiled with cython

2016-02-08 Thread Adam Johnson
Hey Cristiano Yeah it's a shame it didn't work out. In our case, we would love to try Jinja2, but we can't, because the slow pages are in the Django Admin rather than our own code :( For our main site we do use javascript templates - clientside as you say, except we call out to a node.js

Re: django template modules compiled with cython

2016-02-05 Thread Adam Johnson
Hi guys, I work with Alex here at YPlan. We deployed a tidied updated version of Alex's code as django-speedboost, since it looked promising in local profiling. You can see the code here: https://github.com/YPlan/django-speedboost . It uses a Cythonized version of Django 1.8.8's template

Re: django template modules compiled with cython

2015-12-15 Thread Florian Apolloner
On Monday, December 14, 2015 at 3:53:50 PM UTC+1, Alexandru Damian wrote: > > I am not really convinced that replacing the whole file is a good idea. In >> my experience one gets better results when using Cython by strategically >> replacing single functions and rewriting those in C directly.

Re: django template modules compiled with cython

2015-12-14 Thread Alexandru Damian
On Friday, December 11, 2015 at 9:11:55 AM UTC, Florian Apolloner wrote: > > Hi Alexandru, > > On Thursday, December 10, 2015 at 12:52:46 PM UTC+1, Alexandru Damian > wrote: >> >> I cProfile-instrumented *def get_response() *in >> *django/core/handlers/base.py >> *without (vanilla django)

Re: django template modules compiled with cython

2015-12-11 Thread Florian Apolloner
Hi Alexandru, On Thursday, December 10, 2015 at 12:52:46 PM UTC+1, Alexandru Damian wrote: > > I cProfile-instrumented *def get_response() *in *django/core/handlers/base.py > > *without (vanilla django) and with cemplate, posted the results here: > >

Re: django template modules compiled with cython

2015-12-10 Thread Shai Berger
On Thursday 10 December 2015 22:44:54 Tim Graham wrote: > Sorry for the ignorance, but I have little idea what cython is and what > incorporating this into Django involves. If you could give a little > background information that would be appreciated. > Cython (http://cython.org/) is a system for

Re: django template modules compiled with cython

2015-12-10 Thread Russell Keith-Magee
On Thu, Dec 10, 2015 at 7:52 PM, Alexandru Damian wrote: > Hi Russ, > > Thanks for coming back to me so quickly. > > On Thursday, December 10, 2015 at 12:30:03 AM UTC, Russell Keith-Magee > wrote: >> >> HI Alex, >> >> On Wed, Dec 9, 2015 at 9:57 PM, Alexandru Damian

Re: django template modules compiled with cython

2015-12-10 Thread Tim Graham
Sorry for the ignorance, but I have little idea what cython is and what incorporating this into Django involves. If you could give a little background information that would be appreciated. On Thursday, December 10, 2015 at 1:14:46 PM UTC-5, Florian Apolloner wrote: > > > > On Thursday,

Re: django template modules compiled with cython

2015-12-10 Thread Florian Apolloner
On Thursday, December 10, 2015 at 12:52:46 PM UTC+1, Alexandru Damian wrote: > > I am thinking of cythonizing parts of django (e.g. the modules that I am > modifying here) - this will bring .c compilation on install, but will make > code faster in the framework, where it is likely that nobody

Re: django template modules compiled with cython

2015-12-10 Thread Alexandru Damian
Hi Russ, Thanks for coming back to me so quickly. On Thursday, December 10, 2015 at 12:30:03 AM UTC, Russell Keith-Magee wrote: > > HI Alex, > > On Wed, Dec 9, 2015 at 9:57 PM, Alexandru Damian > wrote: > >> Hi, >> >> I've compiled the

Re: django template modules compiled with cython

2015-12-09 Thread Russell Keith-Magee
HI Alex, On Wed, Dec 9, 2015 at 9:57 PM, Alexandru Damian wrote: > Hi, > > I've compiled the django.template.{base,context,context_processor} modules > with cython in order to speed up template rendering. > > I've come to the conclusion that this is needed after profiling long