django-scribbler
django-scribbler copied to clipboard
Template rendering performance
I just realised, that if I delete all scribbles from my template, the template rendering times are 100-300 ms shorter (measured by https://pypi.org/project/django-debug-toolbar-template-profiler/ with user logged off). This is significant performance issue for me, since it can be 1/3 or more of the whole request time.
I will investigate this further.
I have gone a bit further with the investigation. I find out, that the biggest hurdle is getting the cache key (https://github.com/caktus/django-scribbler/blob/master/scribbler/templatetags/scribbler_tags.py#L54). This single command lasts 30-50ms for every scribble on the page, even thou the cache debug toollbar measures that getting the cache key to ~0.5ms.
I use Redis cache backend.
Sorry, that was false lead - the delay was caused by the cache debug toolbar.