Page MenuHomePhabricator

Don't let blame run for longer than 15 seconds
ClosedPublic

Authored by epriestley on Jan 7 2016, 2:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 8:00 AM
Unknown Object (File)
Sat, Apr 6, 11:32 PM
Unknown Object (File)
Mar 5 2024, 3:27 AM
Unknown Object (File)
Feb 6 2024, 5:53 PM
Unknown Object (File)
Dec 27 2023, 8:03 AM
Unknown Object (File)
Dec 23 2023, 11:38 PM
Unknown Object (File)
Dec 22 2023, 9:02 PM
Unknown Object (File)
Dec 21 2023, 3:15 PM

Details

Reviewers
chad
Maniphest Tasks
T2450: Build a blame cache
Commits
Restricted Diffusion Commit
rP438100691d42: Don't let blame run for longer than 15 seconds
Summary

Fixes T2450. If we spend more than 15 seconds in blame, just cut it off.

Test Plan
  • Changed timeout to 0.01 seconds.
  • Did blame on a non-highlighted file, got no blame, saw warning.
  • Did blame on a highlighted file, got no blame.
    • Note: you don't get a warning here because of Ajax stuff. It'd be kind of tricky to add and doesn't seem like a big deal so I'm planning to leave it as-is for now.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Don't let blame run for longer than 15 seconds.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
  • Also simply prevent it from running on large files at all.

@20after4 / @chasemp:

  • This and prior commits in the sequence (see T2450) should generally improve the behavior you ran into.
  • We will no longer try to generate blame data for very large files (>256KB of text).
  • We no longer try to highlight very large files.
  • We will no longer spend more than 15 seconds trying to generate blame data for files we do try to pull it for.
  • Generation of blame data is now faster and cached better; cache hits are on the order of tens of milliseconds instead of multiple seconds.
  • Rendering of blame data is now much better in extreme cases (although, broadly speaking, we now decline to try to pull the data in extreme cases).
chad edited edge metadata.
This revision is now accepted and ready to land.Jan 7 2016, 2:42 AM
This revision was automatically updated to reflect the committed changes.