Disabling "Show Whitespace changes" takes minutes to take affect

Summary

When a "large" merge request diff is viewed (70 files, 9000 additions, 9000 deletions) and the "Show Whitespace Changes" option is disabled, it takes the page minutes to update causing Chrome to give an unresponsive page notification.

When you copy the URL and disable white space by adding the ws=1 parameter in the URL, the page renders quickly as expected.

Steps to reproduce

  1. View a diff with many files and changes (70 files, 9000 additions, 9000 deletions)
  2. Disable "Show whitespace changes"
  3. The page will take minutes to render and chrome will deem it unresponsive

Example Project

We are using Gitlab Starter 12.0

What is the current bug behavior?

Disabling show whitespace changes via the checkbox takes on the order of minutes while setting the URL parameter and refreshing takes seconds.

What is the expected correct behavior?

Disabling show whitespace changes via the checkbox should take on the order of seconds similar to setting it via URL parameter.

Relevant logs and/or screenshots

N/A

Output of checks

N/A

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:         Ubuntu 16.04 
Proxy:          no
Current User:   git 
Using RVM:      no
Ruby Version:   2.6.3p62
Gem Version:    2.7.9
Bundler Version:1.17.3
Rake Version:   12.3.2
Redis Version:  3.2.12
Git Version:    2.21.0
Sidekiq Version:5.2.7
Go Version:     unknown

GitLab information Version: 12.0.3-ee Revision: 1b1872f9d93 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.7 URL: *** HTTP Clone URL: *** SSH Clone URL: *** Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 9.3.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 9.3.0 ? ... OK (9.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... Server: ldapmain

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 3/1 ... yes 10/6 ... yes 12/7 ... yes 11/9 ... yes 11/10 ... yes 11/12 ... yes 11/13 ... yes 11/14 ... yes 11/15 ... yes 11/17 ... yes 11/18 ... yes 11/19 ... yes 11/20 ... yes 11/21 ... yes 11/22 ... yes 12/23 ... yes 11/24 ... yes 10/25 ... yes 12/26 ... yes 12/27 ... yes 12/28 ... yes 12/29 ... yes 12/30 ... yes 12/31 ... yes 12/32 ... yes 12/33 ... yes 12/34 ... yes 12/35 ... yes 11/36 ... yes 11/37 ... yes 11/38 ... yes 12/39 ... yes 12/40 ... yes 12/41 ... yes 11/42 ... yes 11/43 ... yes 11/44 ... yes 11/45 ... yes 11/46 ... yes 11/47 ... yes 11/48 ... yes 11/49 ... yes 11/50 ... yes 11/51 ... yes 11/52 ... yes 11/53 ... yes 11/54 ... yes 11/55 ... yes 11/56 ... yes 11/57 ... yes 11/58 ... yes 11/59 ... yes 11/60 ... yes 11/61 ... yes 11/62 ... yes 11/63 ... yes 11/64 ... yes 11/65 ... yes 11/66 ... yes 11/67 ... yes 11/68 ... yes 11/69 ... yes 11/70 ... yes 11/71 ... yes 11/72 ... yes 11/73 ... yes 11/74 ... yes 11/75 ... yes 11/76 ... yes 11/77 ... yes 11/78 ... yes 11/79 ... yes 11/80 ... yes 11/81 ... yes 11/82 ... yes 11/83 ... yes 11/84 ... yes 11/85 ... yes 11/86 ... yes 11/87 ... yes 11/88 ... yes 11/89 ... yes 11/90 ... yes 11/91 ... yes 11/92 ... yes 11/93 ... yes 11/94 ... yes 11/95 ... yes 11/96 ... yes 11/97 ... yes 11/98 ... yes 11/99 ... yes 11/100 ... yes 11/101 ... yes 11/102 ... yes 11/103 ... yes 11/104 ... yes 11/105 ... yes 11/106 ... yes 11/107 ... yes 11/108 ... yes 11/109 ... yes 20/110 ... yes 11/111 ... yes 11/112 ... yes 11/113 ... yes 20/114 ... yes 11/115 ... yes 11/116 ... yes 11/117 ... yes 29/119 ... yes 29/120 ... yes 29/121 ... yes 11/122 ... yes 29/123 ... yes 11/124 ... yes 11/125 ... yes 11/126 ... yes 11/127 ... yes 11/128 ... yes 11/129 ... yes 11/130 ... yes 11/131 ... yes 11/132 ... yes 11/133 ... yes 11/134 ... yes 11/135 ... yes 20/136 ... yes 11/137 ... yes 3/138 ... yes 11/139 ... yes 11/143 ... yes 11/144 ... yes 11/145 ... yes 20/146 ... yes 11/147 ... yes 11/148 ... yes 11/149 ... yes 11/150 ... yes 11/151 ... yes 36/152 ... yes 38/153 ... yes 11/154 ... yes 13/156 ... yes 13/157 ... yes 13/158 ... yes 13/159 ... yes 13/160 ... yes 13/161 ... yes 13/162 ... yes 13/163 ... yes 13/164 ... yes 13/165 ... yes 13/166 ... yes 13/167 ... yes 13/168 ... yes 13/169 ... yes 13/170 ... yes 13/171 ... yes 13/172 ... yes 13/173 ... yes 13/174 ... yes 13/175 ... yes 13/176 ... yes 13/177 ... yes 13/179 ... yes 13/180 ... yes 13/182 ... yes 13/183 ... yes 13/184 ... yes 29/185 ... yes 29/187 ... yes 29/189 ... yes 29/190 ... yes 29/191 ... yes 29/192 ... yes 29/193 ... yes 29/194 ... yes 29/197 ... yes 29/198 ... yes 29/199 ... yes 29/200 ... yes 29/201 ... yes 29/202 ... yes 29/203 ... yes 29/204 ... yes 12/205 ... yes 29/206 ... yes 11/207 ... yes 11/208 ... yes 11/209 ... yes 70/210 ... yes 11/211 ... yes 20/212 ... yes 20/213 ... yes 29/214 ... yes 11/218 ... yes 11/219 ... yes 82/220 ... yes 11/221 ... yes 11/222 ... yes 11/223 ... yes 20/224 ... yes 82/225 ... yes 90/226 ... yes 17/227 ... yes 17/228 ... yes 82/229 ... yes 82/230 ... yes 28/231 ... yes 63/232 ... yes 17/233 ... yes 120/234 ... yes 83/235 ... yes 29/240 ... yes 85/241 ... yes 131/242 ... yes 131/243 ... yes 17/244 ... yes 131/245 ... yes 131/246 ... yes 131/247 ... yes 131/248 ... yes 131/249 ... yes 131/250 ... yes 34/251 ... yes 17/253 ... yes 131/254 ... yes 13/255 ... yes 34/256 ... yes 96/257 ... yes 131/258 ... yes 131/259 ... yes 131/260 ... yes 12/261 ... yes 131/264 ... yes 37/265 ... yes 12/266 ... yes 131/267 ... yes 82/268 ... yes 82/270 ... yes 159/271 ... yes 8/272 ... yes 11/273 ... yes 46/274 ... yes 20/275 ... yes 82/276 ... yes 175/277 ... yes 175/278 ... yes 175/279 ... yes 82/280 ... yes 188/281 ... yes 188/283 ... yes 188/284 ... yes 188/285 ... yes 188/286 ... yes 188/287 ... yes 131/288 ... yes 17/289 ... yes 184/290 ... yes 82/291 ... yes 188/292 ... yes 188/293 ... yes 34/294 ... yes 188/295 ... yes 188/296 ... yes 82/297 ... yes 59/298 ... yes 188/300 ... yes 188/301 ... yes 175/302 ... yes 206/303 ... yes 12/304 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.21.0 ? ... yes (2.21.0) Git user has default SSH configuration? ... yes Active users: ... *** Elasticsearch version 5.6 - 6.x? ... skipped (elasticsearch is disabled)

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

/label ~bug

Edited Jul 30, 2019 by Bryan Corralejo
Assignee Loading
Time tracking Loading