Closed Bug 1374900 Opened 3 years ago Closed 3 years ago

Improve performance of DrawTargetRecording serialization

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

Details

Attachments

(7 files)

I have patches that do this.
Blocks: 1362115
The base class implementation does nothing.
Attachment #8880130 - Flags: review?(lsalzman)
Give each Event a Record() method that's generic over the type of stream
and inherit a RecordToStream() method that Record's to an istream.
Attachment #8880132 - Flags: review?(lsalzman)
Attached patch . Add MemWriterSplinter Review
Add a dummy RecordToStream() implementation that supports something other than
istream. This makes a couple of places more generic to support this.
Attachment #8880133 - Flags: review?(lsalzman)
This is much faster than using a stringstream for a couple of reasons:
1. ostream needs to do a virtual call on each write which means that
   it can't be inlined.
2. stringstream needs to check for resize every write(). We combine
   those checks into a single one.
Attachment #8880134 - Flags: review?(lsalzman)
Attachment #8880130 - Flags: review?(lsalzman) → review+
Attachment #8880131 - Flags: review?(lsalzman) → review+
Attachment #8880132 - Flags: review?(lsalzman) → review+
Attachment #8880133 - Flags: review?(lsalzman) → review+
Attachment #8880134 - Flags: review?(lsalzman) → review+
Attachment #8880135 - Flags: review?(lsalzman) → review+
Attachment #8880136 - Flags: review?(lsalzman) → review+
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/006efee1302a
Remove useless RecordToStream calls. r=lsalzman
https://hg.mozilla.org/integration/mozilla-inbound/rev/442b9e9ad0fc
Make our low level serialization functions generic over the type of stream. r=lsalzman
https://hg.mozilla.org/integration/mozilla-inbound/rev/3730d296ca2b
Add MemWriter r=lsalzman
https://hg.mozilla.org/integration/mozilla-inbound/rev/99a695d47457
Replace MemWriter with a MemStream implementation. r=lsalzman
https://hg.mozilla.org/integration/mozilla-inbound/rev/b29a83cc516c
Rewrite DrawEventRecorderMemory to use the MemStream infrastructure. r=lsalzman
https://hg.mozilla.org/integration/mozilla-inbound/rev/fea05852b6d3
Replace CopyRecording with direct use of the memory buffer. r=lsalzman
Depends on: 1427118
Assignee: nobody → jmuizelaar
Depends on: 1462049
You need to log in before you can comment on or make changes to this bug.