Animations for placeholders in repository files view severely degrade performance for views with many files
Summary
When opening a repo/folder with many files I was recently wondering why performance was so bad:
- The page virtually takes forever to load while showing a nice animation on placeholders while loading last commit / author info on each file).
- Responsiveness of the page (i.e. the browser!) is very bad during this time
- If one is lucky this stops once all commit / author info is loaded.
I eventually realized: This is not (only) slow because of loading content, but primarily because of showing the animation that should make the wait time more comfortable! Apparently rendering hundreds if not thousands of animations uses up all the resources the browser has for a single page, making loading probably a lot slower than it needs to be.
Steps to reproduce
Open "Repository -> Files" view and navigate to any folder with a lot of files (>~ 100)
Example Project
Any project with at least one folder with many files, e.g. https://gitlab.com/gitlab-org/gitlab/-/tree/master already takes some time to load.
It gets worse with more files. I usually see this behavior at https://gitlab.gnome.org/GNOME/gtk/-/tree/master/gtk (external instance), but folders like https://gitlab.com/inkscape/inkscape/-/tree/master/share/icons/hicolor/scalable/actions (gitlab.com) are also fun.
What is the current bug behavior?
Loading of the file view is extremely slow.
What is the expected correct behavior?
Loading of the file view should be fast.