Hi Alvaro, Firstly - congratulations - sounds like an interesting package. However, you may find that django-users is a better forum to announce something like that. Django-developers is the forum for discussing the development of Django itself, and while most of the people on this list also use django, django-users is a bigger audience.
Secondly - the "would I use this" question... maybe. Faster templates are obviously a good thing; I'd be interested to see exactly how much faster (and how much faster compared to a "known fast" alternative template language like Jinja2). I'm especially interested to see how it's handled custom template tags, because that has always been the sticking point for faster *native* Django templates. Lastly - you've implemented a binding layer to a new template language. Is there anything in Django's core that you would like to see modified that would make your life easier? Using a custom template language is an area where many people claim it's impossible to do (despite evidence to the contrary), so we'd like to make it as easy as possible to do. Any suggestions/requests? Yours, Russ Magee %-) On Wed, Aug 6, 2014 at 6:21 PM, Alvaro J. Genial <gen...@alva.ro> wrote: > Howdy, > > I'd like to announce a beta release of django-synth, a Python package > that enables the seamless use of Synth <https://github.com/ajg/synth> in > Django <https://www.djangoproject.com/> projects. Synth is a template > parser and renderer written in C++ that features a complete, standalone > implementation of Django's template system, with experimental support for > custom tags and filters. > > You can install it as follows: > > pip install pip --upgrade # Ensure wheel support > pip install django-synth > > Then require it (e.g. django-synth>=0.7.0) and add it to your settings: > > TEMPLATE_LOADERS = ( > 'django_synth.loaders.FilesystemLoader', > 'django_synth.loaders.AppDirectoriesLoader', > ) > > (Note that installation can take a while if there are no pre-built binary > wheels for the platform; also, note that the Synth bindings are designed to > work predominantly with Python 2.7 and 3.4.) > > Preliminary testing suggests that the Synth implementation can be 10x to > 30x faster, though take those figures with a grain of salt because > benchmarking is difficult to get right in the general case. If you're > curious, this <https://github.com/ajg/synth/blob/master/tests/timings.py> is > the relevant timing code--feel free to help improve it. > > At this stage the output may not always match byte for byte, especially > when using existing custom libraries (which require a good deal of black > magic to interoperate.) For example, the blocktrans tag from Django's i18n > library is known to give some grief; regardless, the plan is to implement > all the common custom libraries (i18n, l10n, static, staticfiles, tz, > humanize and webdesign) in order to minimize use of the custom-loading > mechanism and crossing the Python/C++ boundary. > > For what it's worth, besides the Django template language, django-synth > also lets you use server-side includes (SSI) and Perl's HTML::Templates > "for free" from Django, since Synth implements those too. There's a setting > that controls the default engine used, plus a few others > <https://github.com/ajg/django-synth#settings> to tweak Synth's behavior. > > Anyway, is there interest in developing django-synth further? > > If there is, the roadmap would include: > - Reaching a stable, fully-compatible first release > - Implementing all common custom libraries natively > - Writing a full set of documentation > - Enhancing performance: parallel parsing, speculative rendering, > aggressive caching, etc. > > However, first I'd like to get a sense of whether such work would be > useful. As always, all feedback is appreciated. > > Thank you! > > Alvaro <http://alva.ro> > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at http://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/a052bfe4-4106-410d-8bb4-bbf8082f7f8a%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/a052bfe4-4106-410d-8bb4-bbf8082f7f8a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJxq8481o41iRrGDHwG-kC5173ZbBpk9DXkZnH4zexqpRfv4Eg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.