Closed Bug 105719 Opened 23 years ago Closed 18 years ago

nsObserverService::Notify can avoid QI/ADDREF

Categories

(Core :: XPCOM, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: dougt, Unassigned)

Details

Attachments

(1 file)

nsObserverService::Notify can avoid QI/ADDREF by accessing the nsObserverList's
nsISupportsArry directly.
another suggestion is to move the notification logic into nsObserverList - by
adding a public method to notify observers in the list.
Keywords: perf
Target Milestone: --- → mozilla0.9.7
also see 55228

also, we should set some state so that we do not have to QI every observer for a
weak reference.
Attached patch draft patch.Splinter Review
Reduces QI and enumeration object create during notification.  Inital Perf
timing is about 1.5x faster although clocked time is < a 200 microsecond
difference.
The perf delta is low.  Moving out
Keywords: perf
Target Milestone: mozilla0.9.7 → mozilla0.9.9
Target Milestone: mozilla0.9.9 → Future
Assignee: dougt → nobody
QA Contact: scc → xpcom
Fixed by bug 326491, I believe.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: