"Diff too big" on small file diffs following a large file diff

Issue #16359 closed
John Pearce
created an issue

Our pull request contains a large file diff (11k lines) followed by many small file diffs. However, the one large file diff is causing all following diffs to be hidden. This is an inconvenience as it requires every user to repeatedly click-and-scroll to show the diffs, every time they reload the page.

Diff stat:

$ git diff --stat develop..PROJ-11
 .gitignore                                                |     1 -
 package-lock.json                                         | 11447 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 package.json                                              |     4 +-
 src/app/app-routing.module.ts                             |    11 +-
 src/app/app.component.html                                |     5 +-
 src/app/app.component.ts                                  |     4 +
 src/app/app.module.ts                                     |     9 +-
 src/app/auth/auth-guard.service.ts                        |    39 +
 src/app/auth/auth-http-interceptor.ts                     |    39 +
 src/app/auth/authentication.service.spec.ts               |   273 +++++-
 src/app/auth/authentication.service.ts                    |   141 +++-
 src/app/auth/login-form/login-form.component.spec.ts      |   186 ++--
 src/app/auth/login-form/login-form.component.ts           |    18 +-
 src/app/product-header/product-header.component.html      |     4 +-
 src/app/product-header/product-header.component.ts        |    18 +-
 src/app/sighting/sighting-list/sighting-list.component.ts |     1 +
 src/app/sighting/sighting-routing.module.ts               |    23 +
 src/app/sighting/sighting.module.ts                       |     4 +-
 18 files changed, 12113 insertions(+), 114 deletions(-)

Screen shot attached.

Also, a related suggestion: the diff stat that Bitbucket shows at the top of the pull request won't load upon the same conditions. Why not load this diff stat separately to the large file diffs, so that the user can see just how many lines changed in the offending files with diffs too large to display?

Comments (6)

  1. Alastair Wilkes staff
    • changed status to open

    Hi John,

    Thanks for opening this issue. We're aware that the current approach generates issues like these and are actually working on a new version of the pull request view that will utilize an approach similar to what you've suggested here.

    Stay tuned for more info on when you and your team can try out the new view. Thanks!

    Bitbucket PM

  2. Tom Taylor

    Can we also stop the auto loading of large files during diff? It is almost crashing Google Chrome

    At least having the option to load large files during diff manually would be more beneficial :)

  3. Log in to comment