Potential out-of-memory crash
(On current gitlab.com) When reviewing moderately large diffs, gitlab tries to allocate way too much memory. There are several arrays of size over 1650k containing objects containing references to other similarly large arrays etc. Simply clicking the button to add a comment takes 5 seconds, posting a comment takes several 10s of seconds and after that the browser crashes (but the comment does get submitted). Here is a screenshot from the developer tools:
Notice the reason for pause at the top right corner, it wasn't a breakpoint that I set myself. It currently hangs at random locations, but if needed, I can try getting a trace to the location where I earlier noticed the huge arrays.
I believe https://gitlab.com/gitlab-org/gitlab-ce/issues/48964 is slightly similar but not quite the same.