Page MenuHomePhabricator

Loading delta between two diffs in Differential can result in diffs for large files failing to load
Open, Needs TriagePublic

Description

I can consistently repro this problem with Differential, and have (so far) found two different cases that repro this.

If I load the page for the revision (/DXXXX), all files load within a couple of seconds. However, if I use the "Show Diff" button in the "Revision Update History" section of the page to look at the delta between two diffs (ending up on a URL like /DXXXX?vs=YYYY&id=ZZZZ&whitespace=ignore-all#toc), then the following happens:

Most files load just fine, but several files stay stuck on "Loading..." indefinitely:

Screenshot_2015-04-07_14.59.07.png (177×1 px, 19 KB)

By looking at the network tab of devtools, I can see that a request to /differential/changeset/ 500s with the response:

>>> UNRECOVERABLE FATAL ERROR <<<

Maximum execution time of 30 seconds exceeded

/phab_path/libphutil/src/utils/utils.php:711


┻━┻ ︵ ¯\_(ツ)_/¯ ︵ ┻━┻

This also causes many JS errors, presumably because of the file that hasn't loaded:

Uncaught Error: JX.$('C2844557NL0') call matched no nodes.

Potentially helpful data: We're using git. In both the repro cases I found, the files that fail to load are >10k lines (whereas files that are <10k lines load fine). But again, these >10k line files load fine in the normal revision view -- it's only in the delta-between-two-diffs view that problems occur.

If you need any more info to debug or repro, let me know.

Event Timeline

jhurwitz raised the priority of this task from to Needs Triage.
jhurwitz updated the task description. (Show Details)
jhurwitz added a project: Differential.
jhurwitz added a subscriber: jhurwitz.

This is probably 2-3 hours of work at the outside, but I'd have to spend 30 minutes poking around with a profiler to be sure. There's a small chance it's more involved, but I believe we're just doing something needlessly inefficient when computing diffs-of-diffs and that there's nothing fundamentally hard or involved here.

In case it helps: I set debug.time-limit to 25s and got this stacktrace.

AphrontApplicationConfiguration.php:196 PhabricatorStartup->onDebugTick()
AphrontApplicationConfiguration.php:121 AphrontApplicationConfiguration->processRequest()
index.php:19 AphrontApplicationConfiguration->runHTTPRequest()
angie added a project: Restricted Project.May 20 2015, 5:15 PM

@jhurwitz do you remember a diff that we saw this on?

eadler added a project: Restricted Project.Aug 5 2016, 5:23 PM