Skip to content

Improve performance of random panels#2018

Merged
BentiGorlich merged 4 commits intomainfrom
new/improve-performance-of-random-panels
Feb 22, 2026
Merged

Improve performance of random panels#2018
BentiGorlich merged 4 commits intomainfrom
new/improve-performance-of-random-panels

Conversation

@BentiGorlich
Copy link
Copy Markdown
Member

  • Random entries, posts and magazines now utilize cached user- and magazine-blocks
  • the active user component is no longer locale specific -> fewer cache misses
  • improve the code for the active user fetch so that
    • the DB is doing more of the heavy lifting
    • avoid doing unnecessary queries (previously we always fetched 3 times from the DB now only 2: fill cache with ids, query users by ids)
  • Move the code to get cached user specific things to the sql helpers, so more repositories can utilize it without risking circular dependencies

- Random entries, posts and magazines now utilize cached user- and magazine-blocks
- the active user component is no longer locale specific -> fewer cache misses
- improve the code for the active user fetch so that
  - the DB is doing more of the heavy lifting
  - avoid doing unnecessary queries (previously we always fetched 3 times from the DB now only 2: fill cache with ids, query users by ids)
- Move the code to get cached user specific things to the sql helpers, so more repositories can utilize it without risking circular dependencies
@BentiGorlich BentiGorlich self-assigned this Feb 16, 2026
@BentiGorlich BentiGorlich added backend Backend related issues and pull requests performance This is a issue regarding performance. labels Feb 16, 2026
@blued-gear
Copy link
Copy Markdown
Collaborator

Did you run these changes on an instance used regularly (or on a dev instance where you checked touched features)? While I don't see an obvious error in the code, as the changes are somewhat large I would feel safer if it was tested in reality-like conditions.

@BentiGorlich
Copy link
Copy Markdown
Member Author

It has been running on gehirneimer for a few days I think (you can check in git log)

@blued-gear
Copy link
Copy Markdown
Collaborator

If there were no issues on gehirneimer so far, you will get the approval after fixing the merge conflict :)

@BentiGorlich
Copy link
Copy Markdown
Member Author

BentiGorlich commented Feb 20, 2026 via email

melroy89
melroy89 previously approved these changes Feb 21, 2026
@BentiGorlich BentiGorlich enabled auto-merge (squash) February 22, 2026 12:00
@BentiGorlich BentiGorlich merged commit 8da49cb into main Feb 22, 2026
9 checks passed
@BentiGorlich BentiGorlich deleted the new/improve-performance-of-random-panels branch February 22, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend related issues and pull requests performance This is a issue regarding performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants