Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template rendering performance #158

Open
PetrDlouhy opened this issue Nov 17, 2020 · 1 comment
Open

Template rendering performance #158

PetrDlouhy opened this issue Nov 17, 2020 · 1 comment

Comments

@PetrDlouhy
Copy link
Contributor

PetrDlouhy commented Nov 17, 2020

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.

@PetrDlouhy
Copy link
Contributor Author

PetrDlouhy commented Nov 19, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant