Fantomas42/django-blog-zinnia

Performance best practices

Closed this issue · 1 comments

I need some input on performance tweaking for the blog. I would like everything but the comments cached or maybe just have the cache refresh if there are comments added. But I am not sure the best way to go about it.

Are there examples of the blog running < .5 sec?

Actual behavior

Site performs normally, but is slow.

Average site response time with all other main pages is < 500 ms
Average site response on blog pages is 3-5 seconds

Expected behavior

Blog is built as AMP enabled and based on their requirements it should be < 1s fully rendered so best expectation is server response should be around 400ms.

Steps to reproduce the issue

Normal operation.

Specifications

  • Zinnia version: django-blog-zinnia (0.18.1)
  • Django version: 1.10.3
  • Python version: 2.7
  • Operating system: CentOS 7

I have tried various forms of caching. Here is what I have now. None seems to make a difference so I might be doing something wrong there.

settings:

CACHES = {
'default': django_cache_url.config(),
'comparison': django_cache_url.config()
}
CACHES['comparison']['LOCATION'] = 'comparison'
CACHES['comparison']['TIMEOUT'] = None

Debug:
print django_cache_url.config()
{'LOCATION': '', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}

Disclaimer

  • I have read the guidelines for contributing linked to above.
  • I have checked for duplicate issues.
  • This is not a support request.

Hello,

sorry for the late reply, generally bad performances are coming from templates integration.

The default templates are optimized to be scalable in terms of SQL queries.
The views are tested to use the minimal queries.

So I can suggest to install django-debug-toolbar and track the performances.

Regards