Closed
Bug 1096487
Opened 10 years ago
Closed 10 years ago
make ipdl message creation marginally more efficient
Categories
(Core :: IPC, defect)
Core
IPC
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(3 files)
4.40 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
4.10 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
33.59 KB,
patch
|
bent.mozilla
:
feedback+
|
Details | Diff | Splinter Review |
We do double work during ipdl message creation: - We initialize fields with the constructor; - We re-initialize some fields with Message::set_* calls after that. We should just let the constructor do as much of the work as it can. We could make the flag setting of set_{sync,interrupt,reply} more efficient, but that would require poking through some abstraction boundaries.
Assignee | ||
Comment 1•10 years ago
|
||
The default constructor for ipdl-generated messages looks like: MOZ_IMPLICIT Msg_AsyncMessage() : IPC::Message(MSG_ROUTING_NONE, ID, IPC::Message::PRIORITY_NORMAL, COMPRESSION_NONE, "PContent::Msg_AsyncMessage") { } IPC::Message::PRIORITY_NORMAL is 1, so any set_priority(1) calls are just redudant. Additionally, the priorities for messages are known at code generation time, so we are always able to provide the right constants to the message constructor, rather than using set_priority calls later.
Attachment #8520071 -
Flags: review?(bent.mozilla)
Assignee | ||
Comment 2•10 years ago
|
||
Similarly to part, there's no need to say we don't know the routing id when constructing a message, and then turn around and set the routing id immediately afterwards. Just let the constructor do its work.
Attachment #8520072 -
Flags: review?(bent.mozilla)
Assignee | ||
Comment 3•10 years ago
|
||
This isn't really a patch, just a diff showing what happens to codegen once you apply the patches.
Attachment #8520076 -
Flags: feedback?(bent.mozilla)
Updated•10 years ago
|
Attachment #8520071 -
Flags: review?(bent.mozilla) → review+
Updated•10 years ago
|
Attachment #8520076 -
Flags: feedback?(bent.mozilla) → feedback+
Comment on attachment 8520072 [details] [diff] [review] part 2 - make ipdl message constructors take their routing id Review of attachment 8520072 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8520072 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9574d0021ac7 https://hg.mozilla.org/integration/mozilla-inbound/rev/811dd70771d5
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/9574d0021ac7 https://hg.mozilla.org/mozilla-central/rev/811dd70771d5
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•