|
|
Created:
4 years, 4 months ago by Fady Samuel Modified:
4 years, 4 months ago CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, tdresser+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review) Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionLatencyInfo mojo: Avoid extra copy of LatencyComponents
Prior to ArrayDataView, during deserialization, we read latency components outs
into a mojo::Array and then read the mojo array out into LatencyInfo's
latency_components_. This results in an unnecessary extra copy and is not
compatible with usage in blink. This CL moves us towards using ArrayDataView.
BUG=629566
Committed: https://crrev.com/b8cd385fb7004724f431d99af4f410adcd51888e
Cr-Commit-Position: refs/heads/master@{#414157}
Patch Set 1 #
Total comments: 1
Messages
Total messages: 19 (6 generated)
fsamuel@chromium.org changed reviewers: + sadrul@chromium.org, xlai@chromium.org
Thanks for the change! Non-owner lgtm.
fsamuel@chromium.org changed reviewers: + tsepez@chromium.org, yzshen@chromium.org
+tsepez@ for security review +yzshen@ FYI
https://codereview.chromium.org/2276743002/diff/1/ui/events/mojo/latency_info... File ui/events/mojo/latency_info_struct_traits.cc (right): https://codereview.chromium.org/2276743002/diff/1/ui/events/mojo/latency_info... ui/events/mojo/latency_info_struct_traits.cc:283: components.GetDataView(i, &component_pair); This change itself LGTM. Performance fyi: It would be more efficient to store keys and values in two parallel arrays, rather than putting them in a single array of pair struct. Because that would save the cost of serializing/validating pair structs. (But Daniel discussed with me about his concern that checking size of the two parallel arrays matches would be one more thing to consider. So if this is really performance critical and you decide to change it to two parallel arrays, you might want to discuss with him. There is a feature request filed to support object keys for mojo map.)
On 2016/08/23 21:23:05, yzshen1 wrote: > https://codereview.chromium.org/2276743002/diff/1/ui/events/mojo/latency_info... > File ui/events/mojo/latency_info_struct_traits.cc (right): > > https://codereview.chromium.org/2276743002/diff/1/ui/events/mojo/latency_info... > ui/events/mojo/latency_info_struct_traits.cc:283: components.GetDataView(i, > &component_pair); > This change itself LGTM. > > Performance fyi: It would be more efficient to store keys and values in two > parallel arrays, rather than putting them in a single array of pair struct. > Because that would save the cost of serializing/validating pair structs. > > (But Daniel discussed with me about his concern that checking size of the two > parallel arrays matches would be one more thing to consider. So if this is > really performance critical and you decide to change it to two parallel arrays, > you might want to discuss with him. There is a feature request filed to support > object keys for mojo map.) From a security perspective, we always discourage the parallel array design.
On 2016/08/24 01:10:30, Tom Sepez (Offsite til 8-23) wrote: > On 2016/08/23 21:23:05, yzshen1 wrote: > > > https://codereview.chromium.org/2276743002/diff/1/ui/events/mojo/latency_info... > > File ui/events/mojo/latency_info_struct_traits.cc (right): > > > > > https://codereview.chromium.org/2276743002/diff/1/ui/events/mojo/latency_info... > > ui/events/mojo/latency_info_struct_traits.cc:283: components.GetDataView(i, > > &component_pair); > > This change itself LGTM. > > > > Performance fyi: It would be more efficient to store keys and values in two > > parallel arrays, rather than putting them in a single array of pair struct. > > Because that would save the cost of serializing/validating pair structs. > > > > (But Daniel discussed with me about his concern that checking size of the two > > parallel arrays matches would be one more thing to consider. So if this is > > really performance critical and you decide to change it to two parallel > arrays, > > you might want to discuss with him. There is a feature request filed to > support > > object keys for mojo map.) > > From a security perspective, we always discourage the parallel array design. How do you feel about the CL as it is now Tom?
Currently LGTM.
On 2016/08/24 16:02:54, Tom Sepez wrote: > Currently LGTM. Thanks all! I'm CQ'ing now.
The CQ bit was checked by fsamuel@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by fsamuel@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== LatencyInfo mojo: Avoid extra copy of LatencyComponents Prior to ArrayDataView, during deserialization, we read latency components outs into a mojo::Array and then read the mojo array out into LatencyInfo's latency_components_. This results in an unnecessary extra copy and is not compatible with usage in blink. This CL moves us towards using ArrayDataView. BUG=629566 ========== to ========== LatencyInfo mojo: Avoid extra copy of LatencyComponents Prior to ArrayDataView, during deserialization, we read latency components outs into a mojo::Array and then read the mojo array out into LatencyInfo's latency_components_. This results in an unnecessary extra copy and is not compatible with usage in blink. This CL moves us towards using ArrayDataView. BUG=629566 Committed: https://crrev.com/b8cd385fb7004724f431d99af4f410adcd51888e Cr-Commit-Position: refs/heads/master@{#414157} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/b8cd385fb7004724f431d99af4f410adcd51888e Cr-Commit-Position: refs/heads/master@{#414157} |