import from legacy storage should use a transaction for better performance.

RESOLVED FIXED in mozilla1.9.2a1

Status

()

Toolkit
Password Manager
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Dolske, Assigned: Dolske)

Tracking

({fixed1.9.1})

Trunk
mozilla1.9.2a1
fixed1.9.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Created attachment 367676 [details] [diff] [review]
Patch v.1

After storage-mozStorage.js calls getAllEncryptedLogins() to get data from the legacy storage module, it calls addLogin() / setLoginSavingEnabled() for each item. If there are a lot of items, this can be a bit slow, and wrapping in a transaction helps.

On my laptop, the import of signons-08.txt (from the pwmgr unit tests, which has 500 logins and 500 disabled hosts) takes 5.0 seconds with the current code, and 2.1 seconds with this patch.
Attachment #367676 - Flags: review?(sdwilsh)

Updated

9 years ago
Attachment #367676 - Flags: review?(sdwilsh) → review+
Comment on attachment 367676 [details] [diff] [review]
Patch v.1

r=sdwilsh
Comment on attachment 367676 [details] [diff] [review]
Patch v.1

a191=beltzner
Attachment #367676 - Flags: approval1.9.1+
(Assignee)

Comment 3

9 years ago
Pushed http://hg.mozilla.org/mozilla-central/rev/6ed2d1cbc338
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Comment 4

9 years ago
Pushed to 191: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/c2ddaf111a3e
Keywords: fixed1.9.1
You need to log in before you can comment on or make changes to this bug.