summaryrefslogtreecommitdiff
path: root/utils/update_mca_test_checks.py
diff options
context:
space:
mode:
authorGreg Bedwell <greg_bedwell@sn.scee.net>2018-04-20 11:38:11 +0000
committerGreg Bedwell <greg_bedwell@sn.scee.net>2018-04-20 11:38:11 +0000
commit2f0f603361d156e655216b46f95d1136934daba2 (patch)
tree80862110e81e8443dff00b6ab44839c814451933 /utils/update_mca_test_checks.py
parentaf64333a9f8673cd85f25be2845d6a38c0c8aad8 (diff)
[UpdateTestChecks] Fix update_mca_test_checks.py slowness issue
The script was using Python's difflib module to calculate the number of lines changed so that it could report it in its status output. It turns out this can be very very slow on large sets of lines (Python bug 6931). It's not worth the cost, so just remove the usage of difflib entirely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330419 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/update_mca_test_checks.py')
-rw-r--r--utils/update_mca_test_checks.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/utils/update_mca_test_checks.py b/utils/update_mca_test_checks.py
index 34442030454..4f75696bdbc 100644
--- a/utils/update_mca_test_checks.py
+++ b/utils/update_mca_test_checks.py
@@ -8,7 +8,6 @@ FileCheck patterns.
import argparse
from collections import defaultdict
-import difflib
import glob
import os
import sys
@@ -313,13 +312,7 @@ def _write_output(test_path, input_lines, prefix_list, block_infos, # noqa
if input_lines == output_lines:
sys.stderr.write(' [unchanged]\n')
return
-
- diff = list(difflib.Differ().compare(input_lines, output_lines))
- sys.stderr.write(
- ' [{} lines total ({} added, {} removed)]\n'.format(
- len(output_lines),
- len([l for l in diff if l[0] == '+']),
- len([l for l in diff if l[0] == '-'])))
+ sys.stderr.write(' [{} lines total]\n'.format(len(output_lines)))
if args.verbose:
sys.stderr.write(