Bug 1307435 - Change compression level of symbols files; r?ted
Currently, we use the gzip default of 6. Our history with zlib tells
us that reducing the compression level to 5 or 4 often yields
significantly faster operations while only sacrificing a little
storage. Measurement here shows similar results.
On libxul.so.dbg:
level time compressed
6 21.0s 231,045,158
5 15.8s 232,926,435
4 12.2s 237,587,011
3 11.1s 245,104,157
Changing the level from 6 to 4 increases the size of the compressed
file by 6,541,853 bytes, or 2.83%. But it saves ~10s from the long
pole of builds in automation. And that's just from libxul.
When you factor in all compressed files, this change has a significant
impact on symbol generation.
Before: 221s wall; 150s CPU; 311,424,856 bytes
After: 192s wall; 130s CPU; 318,085,885 bytes
That's on my machine, which has a 4.0 GHz CPU. CPU time savings in
automation will likely be more significant.
MozReview-Commit-ID: 7CbRSZvUayj
--- a/toolkit/crashreporter/tools/symbolstore.py
+++ b/toolkit/crashreporter/tools/symbolstore.py
@@ -869,17 +869,17 @@ class Dumper_Linux(Dumper):
subprocess.call([self.objcopy, '--add-gnu-debuglink=%s' % file_dbg, file]) == 0:
rel_path = os.path.join(debug_file,
guid,
debug_file + ".dbg")
full_path = os.path.normpath(os.path.join(self.symbol_path,
rel_path))
shutil.move(file_dbg, full_path)
# gzip the shipped debug files
- os.system("gzip -f %s" % full_path)
+ os.system("gzip -4 -f %s" % full_path)
self.output(sys.stdout, rel_path + ".gz")
else:
if os.path.isfile(file_dbg):
os.unlink(file_dbg)
class Dumper_Solaris(Dumper):
def RunFileCommand(self, file):
"""Utility function, returns the output of file(1)"""