Skip to content

Listing branches takes a LONG time #27864

Closed
@hramrach

Description

@hramrach

Description

In a mirror of https://github.com/SUSE/kernel-source.git

listing branches takes a long time

Screenshots

image

Gitea Version

1.20.3

Can you reproduce the bug on the Gitea demo site?

No

Operating System

Linux (openSUSE 15.5)

Browser Version

Chromium 118.0.5993.70 (openSUSE Build) stable (64-bit)

Activity

lunny

lunny commented on Nov 1, 2023

@lunny
Member

This has been resolved in v1.21.

added
issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detail
and removed on Nov 1, 2023
lunny

lunny commented on Nov 1, 2023

@lunny
Member

I just test it on https://gitea.com/lunny/kernel-source/branches
It's faster than your version but I think it can still be optimized further.

hramrach

hramrach commented on Nov 1, 2023

@hramrach
Author

Yes, that's much faster - about 1500ms

lunny

lunny commented on Nov 2, 2023

@lunny
Member

The slow reason is every branch will need to calculate diverged commits numbers with CountDivergingCommits. The result is not cached into database.

added
performance/speedperformance issues with slow downs
and removed
issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detail
on Nov 2, 2023
hramrach

hramrach commented on Nov 2, 2023

@hramrach
Author

This is general problem with how pages are rendered.

https://gitea.com/lunny/kernel-source/activity/monthly takes 16s
https://gitea.com/lunny/kernel-source/activity/quarterly does not finish, ever.

It looks like the page is rendered on the server and then sent in one go.

This leaves the user with a blank page and timeout.

It appears that most forges would use client-side scripting to load large data.

However, the server could send the page chunked - send the header first, and the data as it is generated, and if needed some extra filler when data takes too long to process to avoid timeouts.

In ancient past it was also possible to load data in a frame which is now deprecated in favor of javascript scripting of loads.

Not sure if static HTML can be used to load another page as an element content.

lunny

lunny commented on Dec 5, 2024

@lunny
Member

This is general problem with how pages are rendered.

gitea.com/lunny/kernel-source/activity/monthly takes 16s gitea.com/lunny/kernel-source/activity/quarterly does not finish, ever.

It looks like the page is rendered on the server and then sent in one go.

This leaves the user with a blank page and timeout.

It appears that most forges would use client-side scripting to load large data.

However, the server could send the page chunked - send the header first, and the data as it is generated, and if needed some extra filler when data takes too long to process to avoid timeouts.

In ancient past it was also possible to load data in a frame which is now deprecated in favor of javascript scripting of loads.

Not sure if static HTML can be used to load another page as an element content.

I think this is a new issue from the title. Maybe we could create a new one and close this one.

lunny

lunny commented on Jul 6, 2025

@lunny
Member

Closed as branches list page should be fast enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performance/speedperformance issues with slow downstopic/uiChange the appearance of the Gitea UI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lunny@hramrach

        Issue actions

          Listing branches takes a LONG time · Issue #27864 · go-gitea/gitea