Re: Cython usage within Django

2018-06-12 Thread ijazz jazz
Cython is a superset of Python that lets you significantly improve the speed .The easiest way to use Cython is to use the special pyximport feature. You need to put the code to cythonize in its own module, write one line Python

Re: Cython usage within Django

2017-05-22 Thread Florian Apolloner
On Monday, May 22, 2017 at 1:30:20 AM UTC+2, Tom Forbes wrote: > > As I understand it the Django project itself would not distribute > pre-compiled wheels, the setup.py Cython 'stuff' would handle this (and > fail gracefully if anything goes wrong, like no C compiler being > available). >

Re: Cython usage within Django

2017-05-22 Thread Adam Johnson
FYI a colleague and I tried Cythonizing parts of django.template in 2015, we shared our findings on this list: https://groups.google.com/forum/#!topic/django-developers/CKcZwC3J1eQ . We didn't build it in Django core or a fork, our package replaced parts of Django as they imported using an import

Re: Cython usage within Django

2017-05-21 Thread Curtis Maloney
On 22/05/17 09:30, Tom Forbes wrote: Hey Karl and Russell, Thank you for your quick replies! Russell: You are of course right about the speed of the Python code itself being a bottleneck and the usual suspects like the database are more important to optimize. However I don't think it's

Re: Cython usage within Django

2017-05-21 Thread Tom Forbes
Hey Karl and Russell, Thank you for your quick replies! Karl: Agreed, duplicate CI runs would have to be performed (which would double the time or double the number of runners required). As I understand it the Django project itself would not distribute pre-compiled wheels, the setup.py Cython

Re: Cython usage within Django

2017-05-21 Thread Russell Keith-Magee
Hi Tom, My immediate reaction is No, for three reasons: 1. My experience has been that Cython isn’t especially stable.  Admittedly, I haven’t looked at it for a couple of years, but when I did, I ended up getting caught in some really nasty bugs that came back and forth between micro

Re: Cython usage within Django

2017-05-21 Thread 'Carl Meyer' via Django developers (Contributions to Django itself)
On 05/21/2017 02:59 PM, Tom Forbes wrote: > There are lots of considerations to take into account (like ensuring the > Cython functions are in sync with the fallback ones) It's possible to only have one version of the code, using only Python syntax, and conditionally compile it with Cython if

Cython usage within Django

2017-05-21 Thread Tom Forbes
Hello, There was a very interesting talk at Pycon about using Cython to speed up hotspots in Python programs: https://www.youtube.com/watch?v=_1MSX7V28Po It got me wondering about possibly using Cython in selected places within Django. I realize since Django was first released the distribution