Page MenuHomePhabricator

D19748.id47179.diff
No OneTemporary

D19748.id47179.diff

diff --git a/src/applications/differential/engine/DifferentialChangesetEngine.php b/src/applications/differential/engine/DifferentialChangesetEngine.php
--- a/src/applications/differential/engine/DifferentialChangesetEngine.php
+++ b/src/applications/differential/engine/DifferentialChangesetEngine.php
@@ -88,6 +88,20 @@
private function detectCopiedCode(array $changesets) {
+ // See PHI944. If the total number of changed lines is excessively large,
+ // don't bother with copied code detection. This can take a lot of time and
+ // memory and it's not generally of any use for very large changes.
+ $max_size = 65535;
+
+ $total_size = 0;
+ foreach ($changesets as $changeset) {
+ $total_size += ($changeset->getAddLines() + $changeset->getDelLines());
+ }
+
+ if ($total_size > $max_size) {
+ return;
+ }
+
$min_width = 30;
$min_lines = 3;

File Metadata

Mime Type
text/plain
Expires
May 22 2024, 12:33 AM (4 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6277087
Default Alt Text
D19748.id47179.diff (902 B)

Event Timeline