Closed
Bug 1431449
Opened 6 years ago
Closed 6 years ago
Some URLParams values are created only to be thrown away afterwards
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: nox, Assigned: nox)
References
Details
Attachments
(5 files)
59 bytes,
text/x-review-board-request
|
bzbarsky
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
bzbarsky
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
bzbarsky
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
bzbarsky
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
bzbarsky
:
review+
|
Details |
In many call sites, URLParams values are created only to call URLParams::ParseInput and traverse the result with URLParams::ForEach afterwards. This could be avoided by invoking the URLParams::ForEachIterator callback directly when parsing.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 6•6 years ago
|
||
mozreview-review |
Comment on attachment 8943679 [details] Bug 1431449 - Kill URLSearchParams::ForEach; https://reviewboard.mozilla.org/r/214036/#review219824
Attachment #8943679 -
Flags: review?(bzbarsky) → review+
Comment 7•6 years ago
|
||
mozreview-review |
Comment on attachment 8943680 [details] Bug 1431449 - Introduce URLParams::Parse; https://reviewboard.mozilla.org/r/214038/#review219828
Attachment #8943680 -
Flags: review?(bzbarsky) → review+
Comment 8•6 years ago
|
||
mozreview-review |
Comment on attachment 8943681 [details] Bug 1431449 - Make URLParams::DecodeString static; https://reviewboard.mozilla.org/r/214040/#review219850
Attachment #8943681 -
Flags: review?(bzbarsky) → review+
Comment 9•6 years ago
|
||
mozreview-review |
Comment on attachment 8943682 [details] Bug 1431449 - Move nsTString::ToInteger* methods to nsTSubstring; https://reviewboard.mozilla.org/r/214042/#review219852
Attachment #8943682 -
Flags: review?(bzbarsky) → review+
Comment 10•6 years ago
|
||
mozreview-review |
Comment on attachment 8943683 [details] Bug 1431449 - Make URLParams::ParseInput call URLParams::Parse instead of the opposite; https://reviewboard.mozilla.org/r/214044/#review219856 r=me, though maybe it would be OK to leave the ForEach; might come in handy. Also, we're basically replacing object construction with more virtual calls in the Parse/ParseInput case. That's probably a win just due to less allocation, but it's not obvious.... Might be worth having the commit message explain why this is better, since the bug doesn't really.
Attachment #8943683 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 11•6 years ago
|
||
I'm not sure what introduces more virtual calls, could you explain?
Comment 12•6 years ago
|
||
In the cases that did ParseInput (not Parse), we now have a virtual call for each name/value pair, via aIterator.URLParamsIterator, that didn't use to be there, right?
Assignee | ||
Comment 13•6 years ago
|
||
Oh yes, you are absolutely right. I'll add a note in the commit message, given how fast I forgot about it.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 15•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4c834e5f789da2b7070d4ce00bce63a913432bd7
Comment 16•6 years ago
|
||
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/3b802a492170 Kill URLSearchParams::ForEach; r=bz https://hg.mozilla.org/integration/autoland/rev/ddb98ad66aa0 Introduce URLParams::Parse; r=bz https://hg.mozilla.org/integration/autoland/rev/d86e47eb88db Make URLParams::DecodeString static; r=bz https://hg.mozilla.org/integration/autoland/rev/ecc091d9860d Move nsTString::ToInteger* methods to nsTSubstring; r=bz https://hg.mozilla.org/integration/autoland/rev/c1b5b46f8558 Make URLParams::ParseInput call URLParams::Parse instead of the opposite; r=bz
Updated•6 years ago
|
Priority: -- → P2
Comment 17•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3b802a492170 https://hg.mozilla.org/mozilla-central/rev/ddb98ad66aa0 https://hg.mozilla.org/mozilla-central/rev/d86e47eb88db https://hg.mozilla.org/mozilla-central/rev/ecc091d9860d https://hg.mozilla.org/mozilla-central/rev/c1b5b46f8558
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•