Show More
@@ -26,6 +26,7 b' Set of diffing helpers, previously part ' | |||||
26 | import os |
|
26 | import os | |
27 | import re |
|
27 | import re | |
28 | import bz2 |
|
28 | import bz2 | |
|
29 | import time | |||
29 |
|
30 | |||
30 | import collections |
|
31 | import collections | |
31 | import difflib |
|
32 | import difflib | |
@@ -1186,10 +1187,12 b' def load_cached_diff(cached_diff_file):' | |||||
1186 | return default_struct |
|
1187 | return default_struct | |
1187 |
|
1188 | |||
1188 | data = None |
|
1189 | data = None | |
|
1190 | start = time.time() | |||
1189 | try: |
|
1191 | try: | |
1190 | with bz2.BZ2File(cached_diff_file, 'rb') as f: |
|
1192 | with bz2.BZ2File(cached_diff_file, 'rb') as f: | |
1191 | data = pickle.load(f) |
|
1193 | data = pickle.load(f) | |
1192 | log.debug('Loaded diff cache from %s', cached_diff_file) |
|
1194 | load_time = time.time() - start | |
|
1195 | log.debug('Loaded diff cache from %s in %.3fs', cached_diff_file, load_time) | |||
1193 | except Exception: |
|
1196 | except Exception: | |
1194 | log.warn('Failed to read diff cache file', exc_info=True) |
|
1197 | log.warn('Failed to read diff cache file', exc_info=True) | |
1195 |
|
1198 |
General Comments 0
You need to be logged in to leave comments.
Login now