Closed
Bug 124686
Opened 23 years ago
Closed 23 years ago
nsRegionWin::SetTo should use SetRectRgn
Categories
(Core Graveyard :: GFX, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: bratell, Assigned: bratell)
References
Details
(Keywords: perf)
Attachments
(1 file)
1.09 KB,
patch
|
kmcclusk
:
review+
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
In nsRegionWin::SetTo we destroy the old region and creates a new one. It would
be faster to just set the existing region to a new position with SetRectRgn.
That would save us a DeleteObject and I bet SetRectRgn is much faster than the
CreateRectRgn we use right now and also it would save a couple of byte of code size.
Right now nsRegionWin::SetTo is 7% of the problematic DHTML page in bug 124178
but that extremely high percentage is probably just because it's called too
often. I think.
Assignee | ||
Comment 1•23 years ago
|
||
Here is a patch. I fixed Init to also don't delete/create when it can as well
just set the region. Reviews? Kevin?
Assignee | ||
Comment 2•23 years ago
|
||
A SetRectRgn is ~2us. A CreateRectRgn was ~6us.
Updated•23 years ago
|
Comment 3•23 years ago
|
||
Comment on attachment 68772 [details] [diff] [review]
Replace DeleteObject/CreateRectRgn with SetRectRgn
r=kmcclusk@netscape.com.
Attachment #68772 -
Flags: review+
Comment 4•23 years ago
|
||
Rod can you take a look at Daniel's patch?
Target Milestone: --- → mozilla0.9.9
Comment 5•23 years ago
|
||
Comment on attachment 68772 [details] [diff] [review]
Replace DeleteObject/CreateRectRgn with SetRectRgn
sr=attinasi. Please indicate how this was tested - I am assuming it was tested
:)
Attachment #68772 -
Flags: superreview+
Assignee | ||
Comment 6•23 years ago
|
||
I've been running with it for a week now and I'm still alive. :-)
I've also stepped through the code and the same things happens now as before.
Taking for checkin.
Assignee: kmcclusk → bratell
Assignee | ||
Comment 7•23 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•