Closed Bug 104252 Opened 23 years ago Closed 23 years ago

selectively notify folder listeners

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: sspitzer, Assigned: sspitzer)

References

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

only notify folder listeners when we need to

right now, we notify all folder listeners on all events, even if they don't 
care about those events.

this isn't good for performance, when the listener is implemented in JS.

I've got a fix that extends nsIMsgMailSession::AddFolderListener() to take an 
additional argument:  notify flags.

those who register as folder listeners indicate what things they care about:

nsIFolderListener::added |
nsIFolderListener::removed |
nsIFolderListener::propertyChanged |
nsIFolderListener::intPropertyChanged |
nsIFolderListener::boolPropertyChanged |
nsIFolderListener::unicharPropertyChanged |
nsIFolderListener::propertyFlagChanged |
nsIFolderListener::event

it's working like a charm.  here comes the patch.
Status: NEW → ASSIGNED
Keywords: perf
OS: Windows 2000 → All
Hardware: PC → All
Summary: perf: only notify folder listeners when we need to → selectively notify folder listeners
Target Milestone: --- → mozilla0.9.6
Comment on attachment 53138 [details] [diff] [review]
patch, includes fix for #104226

new patch coming that defines "all" and uses hex instead of ints.
Attachment #53138 - Attachment is obsolete: true
Comment on attachment 53146 [details] [diff] [review]
switch flags to hex, define "all" value, and fix AddFolderListener() call in search.

looks good, r=bienvenu
Attachment #53146 - Flags: review+
Comment on attachment 53146 [details] [diff] [review]
switch flags to hex, define "all" value, and fix AddFolderListener() call in search.

sr=mscott pending module owner approval for the nsSound changes.
Attachment #53146 - Flags: superreview+
fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: esther → stephend
*** Bug 102973 has been marked as a duplicate of this bug. ***
Folder Loading Speed:

10-5-2001 trunk:

1.67 (2.12 1.42 1.46)

10-15-2001 trunk:

1.56 (1.56 1.55 1.52)

Cavin I think has finished logging the API time of what we do parsing the folders 
locally.  Perhaps that's a better way of measuring folder loading speed, since 
even with the perf stuff that you've landed, Seth, my numbers don't reflect 
anything (in fact, they go up ever so slightly, as they do to normal 
fluctuation).

But anyway, I'm sure under the actual API by itself (without calling layout, 
etc.) this fix helped.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.