Closed Bug 1422040 Opened 4 years ago Closed 3 years ago
Add the ability to use ipc::Byte
Buf for blob image transfer
This will let us avoid bug 1405824 and might be fast enough that we don't need to worry about not using shared memory for now.
In this profile https://perfht.ml/2ApmBjH shared memory allocation is taking up at least 10% of webrender display list creation time
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [wr-mvp] [triage] → [wr-mvp]
I might have let out that this was straight forward during yesterday's meeting but in fact IPDL still can't handle move-only types unless they are passed directly as a parameter of the message (so no way to pass it in an ipdl union or struct, which we can't do without in any reasonable way here). So I am this close to go face the undefined behavior dragons by having ByteBuffer fake a copy constructor that const_casts the source and nulls out the buffer (making it equivalent to a move).
Hm, nevermind, this code in the ipdl compiler: > def _cxxTypeNeedsMove(ipdltype): > return ipdltype.isIPDL() and (ipdltype.isArray() or > ipdltype.isShmem() or > ipdltype.isByteBuf() or > ipdltype.isEndpoint()) Refers to ByteBuf which is not ByteBuffer.
After a bit more than a day of refactoring and going through compile errors, the current status is: - IPDL doesn't support move-only types in structures and enum (only directly as message arguments) - IPDL doesn't support serializing nsTArrays of move-only types either due to the array being passed as a const reference while serializing (see generated PFoo::Write(const nsTarray<ByteBuf>&, Message*)) which requires the ParamTrait::Write to be const (which we explicitly don't want here).
4 years ago
This got replaced by bug 1405824 (for now) due to IPDL's allergy to non-copyable types.
Priority: P1 → P3
4 years ago
Priority: P3 → P2
I don't plan to work on this any time soon and bug 1405824 was fixed some other way so closing.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.