Closed Bug 1546310 Opened 5 years ago Closed 5 years ago

LSNG: Parent process should store values in UTF8

Categories

(Core :: Storage: localStorage & sessionStorage, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: janv, Assigned: janv)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

I found out that we can reduce memory footprint by storing values in UTF8 in the parent. Sqlite internally uses UTF8 and transparently converts strings when we load/store values. We can move this conversion to content processes and save memory at the same time.

Memory footprint will be reduced on the child side too, since snapshots store all changes in an array which is then sent to the parent. Entries of the array can use UTF8 too.

This change should mitigate bug 1508740 and bug 1534222.

Compression will come later, we need to switch to nsCString first.

This will require a major version bump since we need to have information about original UTF16 length for quota usage tracking. If we let older Firefox to use the same database, it wouldn't update the new column. Latest Firefox would then use incorrect value length.

Assignee: nobody → jvarga
Blocks: 1540402
Status: NEW → ASSIGNED
Depends on: 1546305
Priority: -- → P1
Type: defect → enhancement
Blocks: 1508740
Blocks: 1513937

I have a patch for this, will send it soon.

Depends on: 1547454
Attachment #9062691 - Attachment is obsolete: true
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/df97dfbb526a
LSNG: Parent process should store values in UTF8; r=asuth
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1549365

Backed out for causing bug 1549362.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla68 → ---
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6c0c17388ff0
LSNG: Parent process should store values in UTF8; r=asuth
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Blocks: 1513881
Depends on: 1552340
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: