One directory object per address book
Categories
(MailNews Core :: Address Book, task)
Tracking
(thunderbird71 fixed, thunderbird72 fixed)
People
(Reporter: darktrojan, Assigned: darktrojan)
Details
Attachments
(1 file, 1 obsolete file)
|
9.80 KB,
patch
|
mkmelin
:
review+
jorgk-bmo
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
Every time we ask the address book manager for an address book by URI, a new AddrBookDirectory object is created. The manager caches these if there's no query in the URI, but if there is a query, it is not cached, so we create a new one. This is bad, especially since if we do a query we typically do many queries in a short time (e.g. finding a contact by typing).
I'm creating an AddrBookDirectoryInner object that is shared by all AddrBookDirectorys that reference the same book. Once we have that established we can use it to improve performance.
(Side objective: when we start changing APIs I want to abandon URIs with queries – actually I want to abandon URIs altogether but that's another topic – and do querying with a method on the single directory object per book.)
| Assignee | ||
Comment 1•6 years ago
|
||
I'm not sure if this is clever use of javascript prototypes, or abuse of javascript prototypes, but it does work.
| Assignee | ||
Comment 2•6 years ago
|
||
| Assignee | ||
Comment 3•6 years ago
|
||
I realised that some things should be members of AddrBookDirectoryInner, not AddrBookDirectory. This was already a problem in theory but now we're explicitly stating there's one inner object it should be fixed.
I've created a member this._inner which is really the same thing as this.__proto__ but less confusing when it's referenced from the inner object itself.
Comment 4•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/18938b699f18
Create only one shared directory object per address book; r=mkmelin
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 6•6 years ago
|
||
TB 71 beta 4:
https://hg.mozilla.org/releases/comm-beta/rev/c18a70f1c20ed8c76564da22eed5566d7ff2ac45
Description
•