Severity: normal → enhancement
Priority: -- → P2
- send feature profile as a base64 string, decode it into a typed array. Stick '=' on the end to distinguish it from oldstyle buchets.
(In reply to Allen Short [:ashort] from comment #1) > - send feature profile as a base64 string, decode it into a typed array. > Stick '=' on the end to distinguish it from oldstyle buchets. seems like it'd that'd be quite long. what about just 10101101001 1,0,1,0,1,1,0,1,00,1 ?
i'm saying that could be encoded as "BWk=".
decode it into a typedarray and you can deal with it in chunks, no need to represent it as a single number.
Ah, I think I see it now, but to be efficient you'd need to pack the bits in groups of 8 yourself, since there is no TypedArray, working on bits, right ? Otherwise you end up using a Uint8Array and wasting 7 bits of space for each byte, and when turning it into base64 ending up with something longer than the equivalent raw string of 0s and 1s (with btoa(String.fromCharCode.apply(null, new Int8Array(arr))) I transform an array of 53 features in a string of 72 chars)
Answering myself: it turns out other people have solved this before :) There are lots of cool BitField implementations using TypedArrays, grouping bits like I suggest in comment 6. Take this gist for instance: https://gist.github.com/panzi/56bbd884e00a5cc548dc An array of alternating true/false values is reduced to "VVVVVVVVFQ==", not bad! My favorite proposal so far, thanks for suggesting it, :ashort.
Fixed in https://github.com/mozilla/fireplace/commit/69eb6392d7efe352eac2fec829eb3c76fea2a430 STR: - Make sure to update your mkt-dev package to version 20150825.134039 - Follow the same steps as https://bugzilla.mozilla.org/show_bug.cgi?id=1188357#c2 - If possible test with multiple FxOS versions - the ones before 2.0 should have less features shown in the "View Feature Profile Information" page
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2015-09-01
Note: like bug 1188357, this is not part of the weekly push, we'll make a new prod package when we need one.
Verified as fixed following steps from comment #9 on different FxOS versions, including versions before 2.0 (less features were shown as green)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.