Skip to content

Rework total calculation for repository tree finder

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

The following discussion from !67509 (merged) should be addressed:

  • @mkaeppler started a discussion: (+4 comments)

    Could you elaborate on this, i.e. inefficient how? Is this in reference to fetching all objects just to count them? Do we expect this to become a problem in production?

    Let's create a follow-up issue as well and link to it here, or it's unlikely anyone will actually replace it.

    A few questions about the implementation overall:

    • Why are caching the tree only when counting the total, when in execute we fetch it again anyway? Can we fetch-and-cache once, then count the item total?
    • Why are we fetching this into redis? I assume the total is rendered out together with the current page. Can we cache this in-process instead?
    • If we decide to use Redis, can we estimate how this will contribute to Redis memory growth over time?
Edited by 🤖 GitLab Bot 🤖