Closed Bug 384864 Opened 17 years ago Closed 17 years ago

imgRequest: replace nsVoidArray with nsAutoVoidArray

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9alpha8

People

(Reporter: alfredkayser, Assigned: alfredkayser)

Details

Attachments

(2 files)

imgRequest uses for mObservers a nsVoidArray.
However some statistical analysis shows that 90% of the cases, the number of items held in the array are 8 or less. So a nsAutoVoidArray (which keeps a auto buffer for upto 8 items) could reduce number of allocations here.

Patch following...
Attached file Statistics ...
Also remove unneeded include
Attachment #268767 - Flags: review?(pavlov)
Attachment #268767 - Flags: review?(pavlov) → review+
Attachment #268767 - Flags: superreview?(tor)
Comment on attachment 268767 [details] [diff] [review]
V1: replace nsVoidArray with nsAutoVoidArray

I have a slight concern for the the footprint hit we'll take for few observers, but aside from that it seems fine.
Attachment #268767 - Flags: superreview?(tor) → superreview+
Attachment #268767 - Flags: approval1.9?
Attachment #268767 - Flags: approval1.9? → approval1.9+
Who can do the checkin for me?
Thanks in advance!
Keywords: checkin-needed
Status: NEW → ASSIGNED
Assignee: nobody → alfredkayser
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
mozilla/modules/libpr0n/src/imgRequest.h  1.36
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M8
and
mozilla/modules/libpr0n/src/imgRequest.cpp  1.95

dunno, why it didn't get applied the first time...
Thanks!

Green tree's, and current nightly (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8pre) Gecko/2007082618 Minefield/3.0a8pre) working fine.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: