Closed Bug 919917 Opened 12 years ago Closed 12 years ago

securemail's publickey field should be lazy-loaded

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

Details

Attachments

(1 file)

currently the publickey field is loaded every time a user object is created. as this field is mediumtext, there's extra work for mysql to fetch the content, however this field is rarely used. we should lazy-load that field.
Good point. Gerv
Attached patch 919917_1.patchSplinter Review
this turned out to be easier than i thought. i removed public_key from object_columns, monkey-patch in a lazy-loader method, and changed all $user->{public_key} references to $user->public_key. the update mechanism via object_update_columns remains untouched.
Attachment #809058 - Flags: review?(dkl)
Comment on attachment 809058 [details] [diff] [review] 919917_1.patch Review of attachment 809058 [details] [diff] [review]: ----------------------------------------------------------------- Looks good and works as expected. r=dkl
Attachment #809058 - Flags: review?(dkl) → review+
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/ modified extensions/SecureMail/Extension.pm Committed revision 9036.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: Extensions: SecureMail → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: