wagtail / wagtail/guide

n+1 and memory bloat in page rendering

Open
#481 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
36
Forks
39
Avg merge
2d 5h
Merged PRs (30d)
3

Description

The site is regularly going well over its memory quota in production, and generally has poor performance. This is very detrimental for users. And I think there are easy pickings on page rendering specifically. and llms.txt generation.

Solutions that I think we should try:

  • Set up assertions on query count in tests
  • Reduce overfetching / fetch better just by reworking the code
  • Caching with invalidation on revision IDs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the page-rendering and llms.txt generation entry points, then inspect the existing tests for query-count coverage. Compare query counts and memory use before changing anything. Done means the relevant tests assert acceptable query counts and production rendering no longer exceeds its memory or performance targets without stale cached output.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.