Skip to content

Viewing large text files cause browser hang #15717

Open
@bagasme

Description

@bagasme
  • Gitea version (or commit ref): master (commit 5c5cfd6) (compiled with Go 1.16.1, Node.js 14.15.4)
  • Git version: 2.31.1
  • Operating system: Debian 10
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
  • Log gist: log

Description

I have copy of git.git repository on my Gitea
instance on LXD instance on my computer. The computer has 4 GB (3.74 GiB)
RAM and 2.93 GiB swap.

After signing in, I browsed that repository, then tried to viewed po/fr.po
(about 700 KiB file). However, browser performance was sluggished (memory
usage was almost full, 100% CPU usage, more than 1 GiB swap used), causing
my computer to hang. I had to xkill the browser.

Surprisingly, Gitea only consumed 160 MiB during the hang, thus the bottleneck
was caused by the browser trying to render the page (2.2 GiB resident memory
was consumed by the browser).

Before starting the reproduction test, I started the browser with blank tab.
The initial memory usage were about 1.35 GiB RAM and 800 MiB swap (because
at the time of writing, I used the browser a lot, so much swap were eaten
up). Also, I repack the repo with git repack -A -d

This was happened with Firefox (Developer Edition).

Metadata

Metadata

Assignees

No one assigned

    Labels

    performance/speedperformance issues with slow downs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions