Unchecking "Show whitespace changes" when comparing changes in large merge request causes page to not respond

Summary

When looking at the changes for a large merge request, clicking the gear and unchecking "Show whitespace changes" causes the page to freeze and eventually not respond. If you add ?w=1 to the url it is instant to load.

Steps to reproduce

  1. Go to large merge request
  2. Go to "Changes" tab
  3. Click gear icon
  4. Toggle "Show whitespace changes"
  5. Wait and eventually kill page and reload to get it to work again

What is the current bug behavior?

Page stops responding

What is the expected correct behavior?

Page should hide whitespace changes, even if it has to reload

Possible fixes

If the page takes too long to toggle showing whitespace changes (or if the request has too many files or changed lines), it should just reload itself with the new setting.

Assignee Loading
Time tracking Loading