Collapsing diff in large MR takes a lot of time
Summary
Collapsing a file in a merge request takes several seconds (~15 seconds) and pegs one CPU the whole time.
Steps to reproduce
- Open leipert/test-project!2 (closed)
- Go to the diff tab. Wait until page is loaded completely
- Collapse the first file
What is the current bug behavior?
It takes several seconds to collapse the file
What is the expected correct behavior?
It should collapse the file instantly.
Relevant logs and/or screenshots
- Start of collapse: 2.8s
- End of collapse: 17.97s