Closed Bug 483693 Opened 15 years ago Closed 15 years ago

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

Categories

(Toolkit :: Password Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: Dolske, Assigned: Dolske)

Details

(Keywords: fixed1.9.1)

Attachments

(1 file)

Attached patch Patch v.1Splinter Review
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)
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+
Pushed http://hg.mozilla.org/mozilla-central/rev/6ed2d1cbc338
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: