Use multiple get for #pre_render / #cache where possible

Created on 17 March 2015, about 10 years ago
Updated 21 March 2025, 12 days ago

Problem/Motivation

#pre_render + #cache is great, but has one big disadvantage:

Items in listings (300 comments, 20 blocks) are gotten one item at a time.

That means 300 cache_get instead of one cache_get_multiple().

The previous block cache did a get_multiple per region and hence was faster.

Proposed resolution

Add a cache pre-fetching foreach () loop on all children to Renderer::render().

Possibly set the pre-warmed data on an internal #cache_data attribute temporarily and remove after the #cache check again.

Remaining tasks

- Write a patch

User interface changes

- None

API changes

- None, no API change at all. Pure performance optimization.

--

This is major because of the performance impact. It likely is also a pretty simple quick fix.

📌 Task
Status

Active

Version

11.0 🔥

Component

cache system

Created by

🇩🇪Germany Fabianx

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024