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

Issue 2203243002: Reduce code size of BindingState (Closed)

Created:
4 years, 4 months ago by tibell
Modified:
4 years, 4 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), Dirk Pranke, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@before-sharing
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reduce code size of BindingState BindingState is a templated class that gets expanded for every Mojo impl, causing code bloat. By moving the functions that don't depend on the template parameter out of line we save roughly 2.3k bytes in safe_json.mojom (on Linux). I expect similar gains for every .mojom. BUG=597125 Committed: https://crrev.com/ad0c0b3bab4a19dfafb51bda1dad56024c2dc9e2 Cr-Commit-Position: refs/heads/master@{#409691}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Tweak --similarity to make binding_state.cc look like move #

Patch Set 3 : --similarity=10 #

Total comments: 10

Patch Set 4 : Address rockot's review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+248 lines, -136 lines) Patch
M mojo/public/cpp/bindings/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/binding_state.h View 1 2 3 7 chunks +100 lines, -132 lines 0 comments Download
A mojo/public/cpp/bindings/lib/binding_state.cc View 1 2 3 1 chunk +137 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/filter_chain.h View 2 chunks +4 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/lib/filter_chain.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (16 generated)
tibell
4 years, 4 months ago (2016-08-03 00:54:22 UTC) #4
tibell
https://codereview.chromium.org/2203243002/diff/1/mojo/public/cpp/bindings/lib/filter_chain.h File mojo/public/cpp/bindings/lib/filter_chain.h (right): https://codereview.chromium.org/2203243002/diff/1/mojo/public/cpp/bindings/lib/filter_chain.h#newcode32 mojo/public/cpp/bindings/lib/filter_chain.h:32: void Append(MessageFilter* filter); This is needed so we can ...
4 years, 4 months ago (2016-08-03 00:57:27 UTC) #5
tibell
I can't make the change look like a move. Sorry! https://codereview.chromium.org/2203243002/diff/40001/mojo/public/cpp/bindings/lib/binding_state.cc File mojo/public/cpp/bindings/lib/binding_state.cc (right): https://codereview.chromium.org/2203243002/diff/40001/mojo/public/cpp/bindings/lib/binding_state.cc#newcode89 ...
4 years, 4 months ago (2016-08-03 01:02:15 UTC) #10
Ken Rockot(use gerrit already)
Very nice! Seems like a huge win. LGTM https://codereview.chromium.org/2203243002/diff/40001/mojo/mojo_public.gypi File mojo/mojo_public.gypi (right): https://codereview.chromium.org/2203243002/diff/40001/mojo/mojo_public.gypi#newcode36 mojo/mojo_public.gypi:36: 'public/cpp/bindings/lib/binding_state.cc', ...
4 years, 4 months ago (2016-08-03 14:55:28 UTC) #13
tibell
Thanks for reviewing. I checked out how big impact this has on the current use ...
4 years, 4 months ago (2016-08-03 23:42:51 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2203243002/60001
4 years, 4 months ago (2016-08-04 01:09:19 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-04 01:13:48 UTC) #22
commit-bot: I haz the power
4 years, 4 months ago (2016-08-04 01:16:59 UTC) #24
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/ad0c0b3bab4a19dfafb51bda1dad56024c2dc9e2
Cr-Commit-Position: refs/heads/master@{#409691}

Powered by Google App Engine
This is Rietveld 408576698