Closed Bug 1546678 Opened 5 years ago Closed 5 years ago

Compress JSON dumps of Remote Settings

Categories

(Firefox :: Remote Settings Client, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: leplatrem, Unassigned)

Details

We ship raw JSON files in our package:
https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/browser/installer/package-manifest.in#291-293

They could be easily compressed in order to reduce the installer size.

(In reply to Mathieu Leplatre [:leplatrem] from comment #0)

They could be easily compressed in order to reduce the installer size.

Note that the installer is supposed to also be compressed... so I'm not sure that it's a straight win to compress the files as shipped. Worth checking. I was mostly thinking that JSON can be a pretty verbose format, and I wondered if there was a better way of shipping this data.

Though looking at the file, it looks like it's about 400k, and I would expect better compression than down to 300k given how repetitive the file is...

Type: defect → enhancement

Gzipping onecrl.json compresses from 400K to 63K

And intermediates.json from 1.3M to 400K, which is consistent with the comment about installer increase in https://bugzilla.mozilla.org/show_bug.cgi?id=1512451#c13 if the package compresses the data

I looked at CBOR, the binary format for which we already have libraries in mozilla-central, and the difference with .gzip is not huge.

It could have made sense to compress the files if they were read from disk, but since we package them in omni.jar it does not really affect the reading.

I'm closing this for now :)

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.