Closed Bug 1444490 Opened 2 years ago Closed 2 years ago

Mark netwerk classes final

Categories

(Core :: Networking, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox60 --- wontfix
firefox61 --- fixed

People

(Reporter: tjr, Assigned: tjr)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Bug 1443252 showed a dramatic improvement in build times by marking just two classes final. While that was definitely the biggest low-hanging fruit, there are other fruit to be plucked, including quite a bit in netwerk/

Every class marked final here will de-virtualize at least 10 method calls. And the single member (SetUsername) will devirtualize 26 calling instances.

The class changes in particular should show some build time improvement, and in general we gain a tiny amount of performance from this.

Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=011081864cb5ec5cc9cabd9aa51ca12b49ac19d7&selectedJob=167024590

I did not queue up a ton of Talos runs for an in-depth comparison, but it seems like there are definite build time improvements, and small perf improvements with no expected regressions.
Priority: -- → P5
Whiteboard: [necko-triaged]
Comment on attachment 8957640 [details]
Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls

https://reviewboard.mozilla.org/r/226532/#review233276

LGTM. Sorry for the lag.
Attachment #8957640 - Flags: review?(hurley) → review+
Pushed by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ab89c04fa91c
Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ab89c04fa91c
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.