Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bbe0aca authored by Kevin Jeon's avatar Kevin Jeon
Browse files

Reduce bug report compression level from 9 to 6.

This change reduces the zlib compression level for bug reports from 9 to
6, which will decrease deflation times at the cost of increasing
compressed bug report sizes.

Averaged over 5 back-to-back bug reports:
- Bug report deflation time decreased from 4.691s to 1.565s.
- Compressed bug report size increased from 12.82MiB to 14.60Mib.

Test: Build; check that bug reports are still taken correctly.
Bug: 215574756
Change-Id: Iedf2bf9f202ea6e0f7316c16da9abfdc14404701
parent 864034bf
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -829,7 +829,8 @@ status_t Dumpstate::AddZipEntryFromFd(const std::string& entry_name, int fd,

    // Logging statement  below is useful to time how long each entry takes, but it's too verbose.
    // MYLOGD("Adding zip entry %s\n", entry_name.c_str());
    int32_t err = zip_writer_->StartEntryWithTime(valid_name.c_str(), ZipWriter::kCompress,
    size_t flags = ZipWriter::kCompress | ZipWriter::kDefaultCompression;
    int32_t err = zip_writer_->StartEntryWithTime(valid_name.c_str(), flags,
                                                  get_mtime(fd, ds.now_));
    if (err != 0) {
        MYLOGE("zip_writer_->StartEntryWithTime(%s): %s\n", valid_name.c_str(),
@@ -921,7 +922,8 @@ void Dumpstate::AddDir(const std::string& dir, bool recursive) {

bool Dumpstate::AddTextZipEntry(const std::string& entry_name, const std::string& content) {
    MYLOGD("Adding zip text entry %s\n", entry_name.c_str());
    int32_t err = zip_writer_->StartEntryWithTime(entry_name.c_str(), ZipWriter::kCompress, ds.now_);
    size_t flags = ZipWriter::kCompress | ZipWriter::kDefaultCompression;
    int32_t err = zip_writer_->StartEntryWithTime(entry_name.c_str(), flags, ds.now_);
    if (err != 0) {
        MYLOGE("zip_writer_->StartEntryWithTime(%s): %s\n", entry_name.c_str(),
               ZipWriter::ErrorCodeString(err));