Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Issue 157003005: Replace std::map with base::SmallMap in ui::LatencyInfo (Closed)

Created:
6 years, 10 months ago by jdduke (slow)
Modified:
6 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Replace std::map with base::SmallMap in ui::LatencyInfo The typical number of components per LatencyInfo instance is quite small. Avoid unnecessary heap allocation by using a SmallMap to store component entries. This reduces the average browser send time cost per touch or scroll event by ~15us on a Nexus 4, and ~22us on a Galaxy Nexus. BUG=341613 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257740

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 1

Patch Set 3 : Move ParamTraits<SmallMap> to base/ #

Total comments: 5

Patch Set 4 : Rebase #

Patch Set 5 : Fix compile #

Total comments: 1

Patch Set 6 : Updates #

Patch Set 7 : Fix pass by value #

Patch Set 8 : Rebase #

Total comments: 1

Patch Set 9 : Fix RenderWidget #

Total comments: 2

Patch Set 10 : Fix test #

Patch Set 11 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -19 lines) Patch
M chrome/browser/ui/views/autofill/autofill_popup_base_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/input_router_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -4 lines 0 comments Download
M ipc/ipc_message_utils.h View 1 2 3 4 2 chunks +36 lines, -0 lines 0 comments Download
M ui/aura/window_event_dispatcher_unittest.cc View 1 2 3 4 5 6 2 chunks +17 lines, -8 lines 0 comments Download
M ui/events/latency_info.h View 1 2 3 4 5 6 2 chunks +7 lines, -3 lines 0 comments Download
M ui/events/latency_info.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 35 (0 generated)
jdduke (slow)
jbauman@: What do you think? This change eliminates heap allocation during event copy entirely on ...
6 years, 10 months ago (2014-02-13 20:45:43 UTC) #1
jdduke (slow)
https://codereview.chromium.org/157003005/diff/70001/content/common/content_param_traits.h File content/common/content_param_traits.h (right): https://codereview.chromium.org/157003005/diff/70001/content/common/content_param_traits.h#newcode76 content/common/content_param_traits.h:76: typedef base::SmallMap<NormalMap, kArraySize, EqualKey, MapInit> param_type; Hmm, this should ...
6 years, 10 months ago (2014-02-13 20:48:42 UTC) #2
jdduke (slow)
tsepez@: Review for ipc/? I originally had the ParamTraits<base::SmallMap> impl local to content/, as I ...
6 years, 10 months ago (2014-02-14 17:16:26 UTC) #3
Tom Sepez
https://codereview.chromium.org/157003005/diff/300001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/157003005/diff/300001/ipc/ipc_message_utils.h#newcode683 ipc/ipc_message_utils.h:683: WriteParam(m, static_cast<int>(p.size())); we ought to be careful here if ...
6 years, 10 months ago (2014-02-14 19:05:37 UTC) #4
Tom Sepez
https://codereview.chromium.org/157003005/diff/300001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/157003005/diff/300001/ipc/ipc_message_utils.h#newcode683 ipc/ipc_message_utils.h:683: WriteParam(m, static_cast<int>(p.size())); On 2014/02/14 19:05:37, Tom Sepez wrote: > ...
6 years, 10 months ago (2014-02-14 19:14:41 UTC) #5
jdduke (slow)
sadrul@: Review for ui/events? Thanks. https://codereview.chromium.org/157003005/diff/300001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/157003005/diff/300001/ipc/ipc_message_utils.h#newcode683 ipc/ipc_message_utils.h:683: WriteParam(m, static_cast<int>(p.size())); On 2014/02/14 ...
6 years, 10 months ago (2014-02-18 01:42:21 UTC) #6
sadrul
events/ lgtm https://codereview.chromium.org/157003005/diff/400001/ui/events/latency_info.h File ui/events/latency_info.h (right): https://codereview.chromium.org/157003005/diff/400001/ui/events/latency_info.h#newcode89 ui/events/latency_info.h:89: It would be interesting to have a ...
6 years, 10 months ago (2014-02-18 12:42:23 UTC) #7
Tom Sepez
lgtm
6 years, 10 months ago (2014-02-18 18:49:00 UTC) #8
jdduke (slow)
miletus@: Could you double-check the change in content/renderer/render_widget.cc? Looking at the code, it appears we ...
6 years, 9 months ago (2014-03-13 22:27:31 UTC) #9
jdduke (slow)
https://codereview.chromium.org/157003005/diff/940001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/157003005/diff/940001/content/renderer/render_widget.cc#newcode1062 content/renderer/render_widget.cc:1062: compositor_->CreateLatencyInfoSwapPromiseMonitor(&swap_latency_info) Hmm, actually it looks like the full |latency_info| ...
6 years, 9 months ago (2014-03-13 22:34:16 UTC) #10
jdduke (slow)
jamesr@: Review for content/renderer/render_widget.{cc,h}? Thanks.
6 years, 9 months ago (2014-03-13 22:42:21 UTC) #11
jamesr
lgtm
6 years, 9 months ago (2014-03-13 22:44:07 UTC) #12
Yufeng Shen (Slow to review)
https://codereview.chromium.org/157003005/diff/960001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/157003005/diff/960001/content/renderer/render_widget.cc#newcode1059 content/renderer/render_widget.cc:1059: ui::LatencyInfo swap_latency_info(latency_info); So why is pass by reference better ...
6 years, 9 months ago (2014-03-13 23:05:43 UTC) #13
jdduke (slow)
I updated the usage to copy the full LatencyInfo. https://codereview.chromium.org/157003005/diff/960001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/157003005/diff/960001/content/renderer/render_widget.cc#newcode1059 content/renderer/render_widget.cc:1059: ...
6 years, 9 months ago (2014-03-13 23:14:07 UTC) #14
Yufeng Shen (Slow to review)
On 2014/03/13 23:14:07, jdduke wrote: > I updated the usage to copy the full LatencyInfo. ...
6 years, 9 months ago (2014-03-13 23:19:34 UTC) #15
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 9 months ago (2014-03-13 23:25:53 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/157003005/960001
6 years, 9 months ago (2014-03-13 23:27:16 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/157003005/960001
6 years, 9 months ago (2014-03-14 00:25:36 UTC) #18
jdduke (slow)
estade@: Review for chrome/browser/ui/views/autofill/autofill_popup_base_view_browsertest.cc? Thanks.
6 years, 9 months ago (2014-03-14 01:44:31 UTC) #19
Evan Stade
lgtm
6 years, 9 months ago (2014-03-17 15:45:26 UTC) #20
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 9 months ago (2014-03-18 09:56:46 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/157003005/1000001
6 years, 9 months ago (2014-03-18 09:56:51 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 09:57:52 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_clang_dbg
6 years, 9 months ago (2014-03-18 09:57:53 UTC) #24
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 9 months ago (2014-03-18 13:43:12 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/157003005/1000001
6 years, 9 months ago (2014-03-18 13:43:24 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 14:29:21 UTC) #27
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) net_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=283589
6 years, 9 months ago (2014-03-18 14:29:22 UTC) #28
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 9 months ago (2014-03-18 14:33:26 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/157003005/1000001
6 years, 9 months ago (2014-03-18 14:33:45 UTC) #30
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 18:45:35 UTC) #31
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
6 years, 9 months ago (2014-03-18 18:45:35 UTC) #32
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 9 months ago (2014-03-18 19:19:53 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/157003005/1000001
6 years, 9 months ago (2014-03-18 19:31:31 UTC) #34
commit-bot: I haz the power
6 years, 9 months ago (2014-03-18 20:48:39 UTC) #35
Message was sent while issue was closed.
Change committed as 257740

Powered by Google App Engine
This is Rietveld 408576698