Closed Bug 998995 Opened 10 years ago Closed 10 years ago

Consider using an auto array in CSSParserImpl::ParseFunction

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

()

Details

Attachments

(1 file)

Reading the profile below, it seems like we're spending 3% of our time resizing the foundValues array here: <http://dxr.mozilla.org/mozilla-central/source/layout/style/nsCSSParser.cpp#12558>.  A reasonable default size there (such as 16 for matrix3d which I think has the largest number of arguments in the CSS functions we support) should help eliminate all of that cost.

Does that make sense to you, David?
Flags: needinfo?(dbaron)
Sounds great.
Flags: needinfo?(dbaron)
Assignee: nobody → ehsan
Comment on attachment 8409763 [details] [diff] [review]
Reserve stack space for 16 arguments when parsing a CSS function; r=dbaron

In my local build, this shaves off about 3% of runtime on this test case: <http://bl.ocks.org/digitarald/11062193>
Attachment #8409763 - Flags: review?(dbaron)
Comment on attachment 8409763 [details] [diff] [review]
Reserve stack space for 16 arguments when parsing a CSS function; r=dbaron

r=dbaron
Attachment #8409763 - Flags: review?(dbaron) → review+
https://hg.mozilla.org/mozilla-central/rev/b9b4ff616b32
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.