New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 624459 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Impove Mojo C++ serialization performance

Project Member Reported by yzshen@chromium.org, Jun 29 2016

Issue description


The following is some early performance number for CompositorFrame serialization, produced by 
https://codereview.chromium.org/2109863002/

CCParamTraitsPerfTest.DelegatedFrame_ManyQuads_1_4000
StructTraits min_frame_serialization_time: = 669.2 us
StructTraits: num runs in 2 seconds: = 2710 
ParamTraits: min_frame_serialization_time: = 368.5 us
ParamTraits: num runs in 2 seconds: = 4920 

CCParamTraitsPerfTest.DelegatedFrame_ManyQuads_1_100000
StructTraits min_frame_serialization_time: = 23046.3 us
StructTraits: num runs in 2 seconds: = 90 
ParamTraits: min_frame_serialization_time: = 9684.099999999999 us
ParamTraits: num runs in 2 seconds: = 210 

CCParamTraitsPerfTest.DelegatedFrame_ManyQuads_4000_4000
StructTraits min_frame_serialization_time: = 1390.4999999999998 us
StructTraits: num runs in 2 seconds: = 1430 
ParamTraits: min_frame_serialization_time: = 778.2 us
ParamTraits: num runs in 2 seconds: = 2550 

CCParamTraitsPerfTest.DelegatedFrame_ManyQuads_100000_100000
StructTraits min_frame_serialization_time: = 42076.299999999996 us
StructTraits: num runs in 2 seconds: = 50 
ParamTraits: min_frame_serialization_time: = 19376.6 us
ParamTraits: num runs in 2 seconds: = 110 


CCParamTraitsPerfTest.DelegatedFrame_ManyRenderPasses_10000_100
StructTraits min_frame_serialization_time: = 42242.200000000004 us
StructTraits: num runs in 2 seconds: = 50 
ParamTraits: min_frame_serialization_time: = 20064.8 us
ParamTraits: num runs in 2 seconds: = 100 


It is showed that serailization with StructTraits (Mojo) is 2x to 2.5x slower than ParamsTraits (IPC).


 

Comment 1 by roc...@chromium.org, Jun 29 2016

To persist part of our offline discussion, it may be worth exploring an alternative implementation approach. Right now we do multiple passes over the message structure in order to avoid multiple allocs/reallocs. It's conceivable that we could actually get better performance by doing a single pass with mulitple alloc/realloc behavior like Pickle does.
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a601f0335f8a35e3a51031a2116d48b319823597

commit a601f0335f8a35e3a51031a2116d48b319823597
Author: yzshen <yzshen@chromium.org>
Date: Fri Jul 01 16:14:14 2016

Mojo C++ bindings: Merge EncodePointers/DecodePointers into Serialize/Deserialize, respectively.

This improves performance because it reduces the number of passes that we need to walk the data structure being serialized/deserialized.
It also simplifies things.

BUG= 624459 

Review-Url: https://codereview.chromium.org/2112093002
Cr-Commit-Position: refs/heads/master@{#403464}

[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/mojo_public.gypi
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/BUILD.gn
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/array_internal.h
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/array_serialization.h
[rename] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/bindings_internal.cc
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/bindings_internal.h
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/control_message_handler.cc
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/control_message_proxy.cc
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/map_data_internal.h
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/map_serialization.h
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/native_struct_data.h
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/pipe_control_message_handler.cc
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/serialization.h
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/serialization_util.h
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/lib/validation_util.h
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/tests/array_common_test.h
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/tests/struct_unittest.cc
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/tests/union_unittest.cc
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/cpp_templates/union_declaration.tmpl
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl
[modify] https://crrev.com/a601f0335f8a35e3a51031a2116d48b319823597/mojo/public/tools/bindings/generators/mojom_cpp_generator.py

For the record, the change in comment #2 improves the numbers for StructTraits:

Before the change (average number from 4 runs of the tests)
================================
ParamsTraits/StructTraits:
DelegatedFrame_ManyQuads_1_4000: 2.124x
DelegatedFrame_ManyQuads_1_100000: 2.714x
DelegatedFrame_ManyQuads_4000_4000: 1.630x
DelegatedFrame_ManyQuads_100000_100000: 2.158x
DelegatedFrame_ManyRenderPasses_10000_100: 2.050x
================================

After the change (average number from 4 runs of the tests)
================================
ParamsTraits/StructTraits:
DelegatedFrame_ManyQuads_1_4000: 1.798x
DelegatedFrame_ManyQuads_1_100000: 2.342x
DelegatedFrame_ManyQuads_4000_4000: 1.525x
DelegatedFrame_ManyQuads_100000_100000: 1.739x
DelegatedFrame_ManyRenderPasses_10000_100: 1.667x
================================

Assuming the ParamTraits numbers are not affected before/after change, the improvement is:
================================
StructTraits_after/StructTraits_before:
DelegatedFrame_ManyQuads_1_4000: 1.181x
DelegatedFrame_ManyQuads_1_100000: 1.159x
DelegatedFrame_ManyQuads_4000_4000: 1.068x
DelegatedFrame_ManyQuads_100000_100000: 1.241x
DelegatedFrame_ManyRenderPasses_10000_100: 1.230x
================================
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0409a7c70ee6087295121da095b5520c2fe14499

commit 0409a7c70ee6087295121da095b5520c2fe14499
Author: fsamuel <fsamuel@chromium.org>
Date: Thu Jul 07 00:29:32 2016

cc::CompositorFrame: Implement ParamTraits vs. StructTraits perf test

This CL modifies the existing cc ParamTraits perf test to
also perform the equivalent test using Mojo StructTraits,
and compares the two side by side.

This CL creates CompositorFrames with SolidColorDrawQuads
instead of PictureDrawQuads because PictureDrawQuads are
not serialized by other ParamTraits or StructTraits.

Finally, this CL renames CCParamTraitsPerfTest to
CCSerializationPerfTest to better capture what it does.

BUG= 624459 
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2109863002
Cr-Commit-Position: refs/heads/master@{#404011}

[modify] https://crrev.com/0409a7c70ee6087295121da095b5520c2fe14499/cc/BUILD.gn
[modify] https://crrev.com/0409a7c70ee6087295121da095b5520c2fe14499/cc/cc_tests.gyp
[delete] https://crrev.com/676a479607fd978f51b0e2a9bffd7d8896ca9a97/cc/ipc/cc_param_traits_perftest.cc
[add] https://crrev.com/0409a7c70ee6087295121da095b5520c2fe14499/cc/ipc/cc_serialization_perftest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ffec10a1d1f56eefae0ea850cc382ecbba653979

commit ffec10a1d1f56eefae0ea850cc382ecbba653979
Author: brucedawson <brucedawson@chromium.org>
Date: Thu Jul 07 01:06:15 2016

Revert of cc::CompositorFrame: Implement ParamTraits vs. StructTraits perf test (patchset #6 id:100001 of https://codereview.chromium.org/2109863002/ )

Reason for revert:
Compile error on Mac GYP (dbg) builds:

../../cc/ipc/cc_serialization_perftest.cc:10:10: fatal error: 'cc/ipc/compositor_frame.mojom.h' file not found
#include "cc/ipc/compositor_frame.mojom.h"

http://build.chromium.org/p/chromium.mac/builders/Mac%20GYP%20%28dbg%29/builds/583/steps/compile/logs/stdio

Original issue's description:
> cc::CompositorFrame: Implement ParamTraits vs. StructTraits perf test
>
> This CL modifies the existing cc ParamTraits perf test to
> also perform the equivalent test using Mojo StructTraits,
> and compares the two side by side.
>
> This CL creates CompositorFrames with SolidColorDrawQuads
> instead of PictureDrawQuads because PictureDrawQuads are
> not serialized by other ParamTraits or StructTraits.
>
> Finally, this CL renames CCParamTraitsPerfTest to
> CCSerializationPerfTest to better capture what it does.
>
> BUG= 624459 
> CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
>
> Committed: https://crrev.com/0409a7c70ee6087295121da095b5520c2fe14499
> Cr-Commit-Position: refs/heads/master@{#404011}

TBR=yzshen@chromium.org,danakj@chromium.org,dcheng@chromium.org,fsamuel@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 624459 

Review-Url: https://codereview.chromium.org/2125833004
Cr-Commit-Position: refs/heads/master@{#404029}

[modify] https://crrev.com/ffec10a1d1f56eefae0ea850cc382ecbba653979/cc/BUILD.gn
[modify] https://crrev.com/ffec10a1d1f56eefae0ea850cc382ecbba653979/cc/cc_tests.gyp
[add] https://crrev.com/ffec10a1d1f56eefae0ea850cc382ecbba653979/cc/ipc/cc_param_traits_perftest.cc
[delete] https://crrev.com/fc061d0530d2a7f831796b02eef7adc7542aaaf7/cc/ipc/cc_serialization_perftest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bb47aac79ed68f12f1a5514035b16ce91252133a

commit bb47aac79ed68f12f1a5514035b16ce91252133a
Author: fsamuel <fsamuel@chromium.org>
Date: Fri Jul 08 01:05:53 2016

cc::CompositorFrame: Implement ParamTraits vs. StructTraits perf test

This CL modifies the existing cc ParamTraits perf test to
also perform the equivalent test using Mojo StructTraits,
and compares the two side by side.

This CL creates CompositorFrames with SolidColorDrawQuads
instead of PictureDrawQuads because PictureDrawQuads are
not serialized by other ParamTraits or StructTraits.

Finally, this CL renames CCParamTraitsPerfTest to
CCSerializationPerfTest to better capture what it does.

BUG= 624459 
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Committed: https://crrev.com/0409a7c70ee6087295121da095b5520c2fe14499
Review-Url: https://codereview.chromium.org/2109863002
Cr-Original-Commit-Position: refs/heads/master@{#404011}
Cr-Commit-Position: refs/heads/master@{#404288}

[modify] https://crrev.com/bb47aac79ed68f12f1a5514035b16ce91252133a/cc/BUILD.gn
[modify] https://crrev.com/bb47aac79ed68f12f1a5514035b16ce91252133a/cc/cc_tests.gyp
[delete] https://crrev.com/68a3da9e9d4990d0d54ec1547141526e3198bb5f/cc/ipc/cc_param_traits_perftest.cc
[add] https://crrev.com/bb47aac79ed68f12f1a5514035b16ce91252133a/cc/ipc/cc_serialization_perftest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af2b4c9fa1cd5dbe75efa84b91a97f661d0997a1

commit af2b4c9fa1cd5dbe75efa84b91a97f661d0997a1
Author: fsamuel <fsamuel@chromium.org>
Date: Fri Jul 08 21:45:33 2016

CompositorFrame: Implement ParamTraits versus StructTraits deserialization test

This CL times deserialization of the CompositorFrame generated by cc_serialization_perftest using StructTraits
versus ParamTraits.

This CL also makes some mojo changes to ensure we don't need to move the mojo::Array we are deserializing from.

BUG= 624459 
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2136593002
Cr-Commit-Position: refs/heads/master@{#404498}

[modify] https://crrev.com/af2b4c9fa1cd5dbe75efa84b91a97f661d0997a1/cc/ipc/cc_serialization_perftest.cc
[modify] https://crrev.com/af2b4c9fa1cd5dbe75efa84b91a97f661d0997a1/mojo/public/cpp/bindings/lib/serialization.h
[modify] https://crrev.com/af2b4c9fa1cd5dbe75efa84b91a97f661d0997a1/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2573dfb1ec3c99ab6d7c1863b8e6a7a24f4fe626

commit 2573dfb1ec3c99ab6d7c1863b8e6a7a24f4fe626
Author: fsamuel <fsamuel@chromium.org>
Date: Fri Jul 08 23:02:44 2016

Make all tests profilable

We did not run profiling on unit and perf tests even when the
enable_profiling build flag was present. In order to dump profiling data,
base::debug::StartProfiling(..) must be called somewhere. I've moved that
code to base::TestSuite. Note that this code is a no-op unless the profiling
build flag is present.

BUG= 624459 
TBR=sky@chromium.org

Review-Url: https://codereview.chromium.org/2131293002
Cr-Commit-Position: refs/heads/master@{#404522}

[modify] https://crrev.com/2573dfb1ec3c99ab6d7c1863b8e6a7a24f4fe626/base/base_switches.cc
[modify] https://crrev.com/2573dfb1ec3c99ab6d7c1863b8e6a7a24f4fe626/base/base_switches.h
[modify] https://crrev.com/2573dfb1ec3c99ab6d7c1863b8e6a7a24f4fe626/base/test/test_suite.cc
[modify] https://crrev.com/2573dfb1ec3c99ab6d7c1863b8e6a7a24f4fe626/chrome/common/chrome_switches.cc
[modify] https://crrev.com/2573dfb1ec3c99ab6d7c1863b8e6a7a24f4fe626/chrome/common/chrome_switches.h
[modify] https://crrev.com/2573dfb1ec3c99ab6d7c1863b8e6a7a24f4fe626/chrome/common/profiling.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f43da76d4c063bf90c3a48a996d45e8bbbf8f94a

commit f43da76d4c063bf90c3a48a996d45e8bbbf8f94a
Author: fsamuel <fsamuel@chromium.org>
Date: Mon Jul 11 17:19:46 2016

cc serialization perf test: Initialize with valid ID

cc_serialization_perftest.cc was failing a DCHECK due to an invalid RenderPass
ID. This CL gives the RenderPass a valid ID to avoid the DCHECK.

BUG= 624459 
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2136043002
Cr-Commit-Position: refs/heads/master@{#404682}

[modify] https://crrev.com/f43da76d4c063bf90c3a48a996d45e8bbbf8f94a/cc/ipc/cc_serialization_perftest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0ef0ba7f069d3474c3b4aa7a7e9224d6f499da8f

commit 0ef0ba7f069d3474c3b4aa7a7e9224d6f499da8f
Author: fsamuel <fsamuel@chromium.org>
Date: Fri Jul 29 16:40:53 2016

cc serialization perf: Add a couple more tests

Add two more tests that better represent real world CompositorFrame sizes

1. 100 Quads * 5 RenderPasses
2. 500 Quads * 10 RenderPasses

BUG= 624459 

Review-Url: https://codereview.chromium.org/2190943002
Cr-Commit-Position: refs/heads/master@{#408660}

[modify] https://crrev.com/0ef0ba7f069d3474c3b4aa7a7e9224d6f499da8f/cc/ipc/cc_serialization_perftest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/edd40fdc29170e97ab54578fdc5096fc564c0ccb

commit edd40fdc29170e97ab54578fdc5096fc564c0ccb
Author: fsamuel <fsamuel@chromium.org>
Date: Fri Jul 29 23:58:20 2016

cc mojo: Use ArrayDataViews in RenderPasses

This CL makes use of the newly introduced Array DataViews
in cc StructTraits in order to improve serialization (and
to a lesser degree deserialization) performance.

This CL improves serialization performance by an average of
18% on an HP Z620. Deserialization performance improves
between 7 to 10%.

Prior to the ability to inspect Array and Struct DataViews
in parent StructTraits, we had to do extra work at
serialization time in order to capture state that spans
individual structs within a larger struct.

This CL addresses two of those cases:

1. Previously, QuadList maintained an extra array of
materials. This array existed so that we could preallocate
the appropriately typed DrawQuads during deserialization.
StructTraits assume a preallocated type and populated
fields in that type.

Alternatively we could have deserialized DrawQuads into
unique_ptrs, but cc required that we allocate DrawQuads
inline within a buffer in order to minimize the cost of
allocations (there can be hundreds of DrawQuads in a
CompositorFrame).

2. Previously, SharedQuadStates were serialized
independently of DrawQuads. However, in in-memory form,
DrawQuads refer to SharedQuadStates via raw pointers. In
order to allow DrawQuads and SharedQuadStates to deserialize
independently, as was required previously by StructTraits, a third
array was serialized "shared_quad_state_references" which was equal in
size to the QuadList. Each slot corresponded to an index in
the SharedQuadStateList. After the QuadList and SharedQuadStateList were
serialized,  shared_quad_state_references updated the raw
pointers in the DrawQuads in the quad list to refer to the
SharedQuadStates. This required revisiting all deserialized
DrawQuads again.

In both 1. and 2. additional state needed to be allocated on the heap
during serialization. In pprof profiling, it became apparent that much
of the cost of serialization was in SetupContext. This CL eliminates
that cost.

Performance measures are available here:
https://docs.google.com/a/google.com/spreadsheets/d/13Y0I-BVDrQC4RHIzMSs0vl0QPe8xFAhYMUAXaxoEqgg/pubhtml

BUG= 624459 
TBR=danakj@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2174843003
Cr-Commit-Position: refs/heads/master@{#408809}

[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/quads.mojom
[delete] https://crrev.com/17f873489bd87f24bff5f0b93aeeedb19754694f/cc/ipc/quads.typemap
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/quads_struct_traits.cc
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/quads_struct_traits.h
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/render_pass.mojom
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/render_pass.typemap
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/render_pass_struct_traits.cc
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/render_pass_struct_traits.h
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/shared_quad_state.mojom
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/shared_quad_state_struct_traits.h
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/struct_traits_unittest.cc
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/traits_test_service.mojom
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/ipc/typemaps.gni
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/quads/render_pass.cc
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/cc/quads/render_pass.h
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/mojo/public/cpp/bindings/array_traits.h
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/mojo/public/cpp/bindings/lib/array_serialization.h
[modify] https://crrev.com/edd40fdc29170e97ab54578fdc5096fc564c0ccb/mojo/public/cpp/bindings/lib/map_serialization.h

Project Member

Comment 14 by bugdroid1@chromium.org, Aug 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b0650ea5b9c43f27bc004a1accf74a1aedebeec1

commit b0650ea5b9c43f27bc004a1accf74a1aedebeec1
Author: yzshen <yzshen@chromium.org>
Date: Tue Aug 02 21:58:55 2016

Mojo C++ bindings: inline validation context methods.

This improves the mojo deserialization tests of cc_serialization_perftest by ~10%.

BUG= 624459 

Review-Url: https://codereview.chromium.org/2202423002
Cr-Commit-Position: refs/heads/master@{#409341}

[modify] https://crrev.com/b0650ea5b9c43f27bc004a1accf74a1aedebeec1/mojo/public/cpp/bindings/lib/validation_context.cc
[modify] https://crrev.com/b0650ea5b9c43f27bc004a1accf74a1aedebeec1/mojo/public/cpp/bindings/lib/validation_context.h

Owner: yzshen@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 18 by bugdroid1@chromium.org, Aug 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6dd4d4beb53992cc5fe420d8f864b8cf2342463b

commit 6dd4d4beb53992cc5fe420d8f864b8cf2342463b
Author: yzshen <yzshen@chromium.org>
Date: Tue Aug 09 23:59:46 2016

CC serialization perftests: more accurate "num runs in 2 seconds".

Previously, the code checked elapsed time every 10 runs. Because some test cases can only do ~30 runs in 2 seconds. The number is too rough to be useful.

BUG= 624459 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2196873002
Cr-Commit-Position: refs/heads/master@{#410882}

[modify] https://crrev.com/6dd4d4beb53992cc5fe420d8f864b8cf2342463b/cc/ipc/cc_serialization_perftest.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Aug 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7ca76d1cfb84ff3483540cf107bec90c99d8a90b

commit 7ca76d1cfb84ff3483540cf107bec90c99d8a90b
Author: fsamuel <fsamuel@chromium.org>
Date: Wed Aug 10 18:41:19 2016

ui/gfx mojo: Don't serialize the identity matrix

Identity transforms are the most common transform on the web
(most things aren't transformed) and so we shouldn't spend a bunch of time
serializing and deserializing (and validating) identity matrices.
This improves deserialization performance of CompositorFrames with a lot
of SharedQuadState or RenderPasses by between 5-15%. Where gfx::Transform
isn't used as much, this change has a negligible impact.

BUG= 624459 

Review-Url: https://codereview.chromium.org/2231013002
Cr-Commit-Position: refs/heads/master@{#411099}

[modify] https://crrev.com/7ca76d1cfb84ff3483540cf107bec90c99d8a90b/ui/gfx/mojo/transform.mojom
[modify] https://crrev.com/7ca76d1cfb84ff3483540cf107bec90c99d8a90b/ui/gfx/mojo/transform_struct_traits.h

Project Member

Comment 20 by bugdroid1@chromium.org, Aug 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0abffe077031a99cf914b683b327312828764e75

commit 0abffe077031a99cf914b683b327312828764e75
Author: fsamuel <fsamuel@chromium.org>
Date: Wed Aug 10 22:43:35 2016

cc: Implement UnionTraits for DrawQuads

Previously DrawQuad inheritance was modeled in mojom as a composition of
optional fields. This resulted in a lot of validation overhead.

With the newly introduced UnionTraits, we can check the tag indicating the
type to serialize and deserialize once, and only validate that type.

This results in a significant performance win for CompositorFrame serialization.

In many cases, serialization is 20-40% faster than ParamTraits, and
deserialization is 5-10% faster.

This CL also removes PICTURE_CONTENT and INVALID material
types from the mojom as we cannot serialize those types of
materials.

BUG= 624459 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2229553004
Cr-Commit-Position: refs/heads/master@{#411169}

[modify] https://crrev.com/0abffe077031a99cf914b683b327312828764e75/cc/ipc/quads.mojom
[modify] https://crrev.com/0abffe077031a99cf914b683b327312828764e75/cc/ipc/quads_struct_traits.cc
[modify] https://crrev.com/0abffe077031a99cf914b683b327312828764e75/cc/ipc/quads_struct_traits.h
[modify] https://crrev.com/0abffe077031a99cf914b683b327312828764e75/cc/ipc/render_pass_struct_traits.cc

Status: Fixed (was: Started)

Sign in to add a comment