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

HTML generated from markup source is not cached, leading to performance issues #571

Open
3 tasks done
delroth opened this issue Jul 7, 2020 · 1 comment
Open
3 tasks done

Comments

@delroth
Copy link

delroth commented Jul 7, 2020

Actual behavior

(This is more of a feature request / performance optimization thing than an actual bug report.)

Zinnia seems to perform no caching of the markup rendering for blog entries. This rendering can be quite expensive especially with:

  1. Large articles (5K+ words)
  2. Syndication feeds, which end up re-rendering many articles on each request (and AFAICT there is no django caching happening at the view layer either).

We've been using Zinnia for the development blog on dolphin-emu.org for quite a while, but recently we've started hitting more and more performance issues due to this behavior. We've had at least one outage caused by multiple clients requesting syndication feeds around the same time and hogging all of the CPU converting markdown to HTML.

Expected behavior

It would probably make sense to keep a cached version of the rendering inside the entry model. This would increase database size, but greatly improve rendering time (basically free).

Steps to reproduce the issue

  1. Add 10+ large blog entries in markdown or any other markup language
  2. Send a lot of requests to /feeds/
  3. Notice the high amount of CPU time wasted.

Specifications

  • Zinnia version: 0.20
  • Django version: 2.2.6
  • Python version: 3.6
  • Operating system: Debian testing

Disclaimer

Before submitting an issue make sure you have:

  • Read the guidelines for contributing.
  • Checked for duplicate issues.
  • Not a support request.
@elarroba
Copy link

elarroba commented Jan 7, 2022

@delroth

I just created a fork of this project and updated the code to work with modern versions of Django (including 4.0+).

Please visit https://github.com/arrobalytics/django-blog-zinnia if you want to contribute. Don't forget to star the project to show your support.

Visit the new site https://www.djangoblogzinnia.com for documentation, demo and other resources.

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

2 participants