1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
phorge-phorge/src/applications/differential
epriestley b64407d47e Fix explosive runtime of detectCopiedCode()
Summary:
Fixes T5041. Pretty sure this is the issue: if a diff contains a large number of identical lines longer than 30 characters, we end up paying O(N^2) for each set.

Instead, when N > 16, opt to pay 0.

Test Plan: Added a test which dropped from ~100s to ~0 after changes (this diff includes a reduced-strenght version of the test, since parsing a 4,000 line diff is a little bit pricey).

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5041

Differential Revision: https://secure.phabricator.com/D9178
2014-05-19 12:39:12 -07:00
..
__tests__ Require a viewer for Remarkup rendering 2013-03-04 12:33:05 -08:00
application Modernize documentation links 2014-03-17 15:01:31 -07:00
capability Allow "Default View" policies to be set to Public 2013-10-09 15:06:18 -07:00
conduit When a conduit method requires a string constant, call it "string-const" not "enum" 2014-05-14 21:59:03 -07:00
config Fix wording of "differential.sticky-accept" 2014-04-28 09:29:05 -07:00
constants Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
controller Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
customfield Use standard handle loading in Releeph 2014-04-18 17:52:32 -07:00
doorkeeper Normalize the definition of "closed" revision statuses 2013-11-25 17:39:24 -08:00
editor When a diff has 12,345 lines, render "12,345 lines" instead of "12 lines" 2014-04-18 17:52:11 -07:00
event Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
exception Clean up various pieces of dead/obsolete Differential code 2014-03-11 13:02:19 -07:00
garbagecollector Complete modularization of the GC daemon 2014-01-15 10:02:31 -08:00
landing Found some missing icons 2014-05-13 07:45:39 -07:00
lipsum Use DifferentialRevisionEditor in lipsum 2014-03-11 13:02:00 -07:00
mail Fix insufficient loading for processing Differential mail 2014-04-24 13:47:57 -07:00
parser Fix explosive runtime of detectCopiedCode() 2014-05-19 12:39:12 -07:00
phid Don't show document types in search for uninstalled applications 2014-04-29 15:01:50 -07:00
query Move a bunch more rendering into SearchEngine 2014-05-08 20:04:19 -07:00
remarkup Require a viewer for Remarkup rendering 2013-03-04 12:33:05 -08:00
render Switch back to zwsp for oncopy line marker 2014-04-08 17:55:48 -07:00
search Use ApplicationTransactions/CustomField to power Differential global search 2014-02-26 11:18:06 -08:00
storage Fix explosive runtime of detectCopiedCode() 2014-05-19 12:39:12 -07:00
view Update PHUIStatusItemView to FontAwesome 2014-05-16 18:59:02 -07:00
DifferentialGetWorkingCopy.php Semi-fix git cloning for non-bare repos for landing 2013-12-30 15:22:32 -08:00