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

Issue 1572213002: Precompile mojom bindings generator jinja templates. (Closed)

Created:
4 years, 11 months ago by Sam McNally
Modified:
4 years, 11 months ago
Reviewers:
yzshen1
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Precompile mojom bindings generator jinja templates. Previously, the mojom bindings generator would use the jinja template files directly, requiring relatively expensive conversion to Python bytecode once for each mojom file. This adds template precompilation and changes the generator to use the precompiled bytecode. On a z620 running Linux, generating all mojo bindings using GN Before: real 0m11.729s user 4m22.588s sys 0m6.003s After: real 0m2.948s user 0m33.126s sys 0m4.564s GYP (many mojom files are only used in GN builds) Before: real 0m9.822s user 0m49.949s sys 0m1.046s After: real 0m5.354s user 0m4.776s sys 0m0.998s Committed: https://crrev.com/61d8b73f3d3891991f2afcd27fc40f5b09448e27 Cr-Commit-Position: refs/heads/master@{#369349}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+306 lines, -160 lines) Patch
A mojo/public/tools/bindings/BUILD.gn View 1 1 chunk +66 lines, -0 lines 0 comments Download
A mojo/public/tools/bindings/bindings.gyp View 1 1 chunk +69 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_cpp_generator.py View 1 chunk +11 lines, -3 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_java_generator.py View 1 chunk +14 lines, -6 lines 0 comments Download
M mojo/public/tools/bindings/generators/mojom_js_generator.py View 1 chunk +9 lines, -1 line 0 comments Download
M mojo/public/tools/bindings/mojom.gni View 3 chunks +32 lines, -68 lines 0 comments Download
M mojo/public/tools/bindings/mojom_bindings_generator.py View 1 4 chunks +61 lines, -28 lines 0 comments Download
M mojo/public/tools/bindings/pylib/mojom/generate/generator.py View 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/pylib/mojom/generate/template_expander.py View 2 chunks +23 lines, -14 lines 0 comments Download
M third_party/mojo/mojom_bindings_generator.gypi View 4 chunks +7 lines, -1 line 0 comments Download
M third_party/mojo/mojom_bindings_generator_explicit.gypi View 4 chunks +10 lines, -2 lines 0 comments Download
M third_party/mojo/mojom_bindings_generator_variables.gypi View 1 chunk +0 lines, -35 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
Sam McNally
4 years, 11 months ago (2016-01-12 02:55:02 UTC) #5
yzshen1
Great to see such improvement! LGTM with a few nits. https://codereview.chromium.org/1572213002/diff/40001/mojo/public/tools/bindings/BUILD.gn File mojo/public/tools/bindings/BUILD.gn (right): https://codereview.chromium.org/1572213002/diff/40001/mojo/public/tools/bindings/BUILD.gn#newcode1 ...
4 years, 11 months ago (2016-01-14 01:32:47 UTC) #6
Sam McNally
https://codereview.chromium.org/1572213002/diff/40001/mojo/public/tools/bindings/BUILD.gn File mojo/public/tools/bindings/BUILD.gn (right): https://codereview.chromium.org/1572213002/diff/40001/mojo/public/tools/bindings/BUILD.gn#newcode1 mojo/public/tools/bindings/BUILD.gn:1: # Copyright 2015 The Chromium Authors. All rights reserved. ...
4 years, 11 months ago (2016-01-14 02:58:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1572213002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1572213002/80001
4 years, 11 months ago (2016-01-14 03:04:42 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_TIMED_OUT, no build URL) android_chromium_gn_compile_dbg on ...
4 years, 11 months ago (2016-01-14 05:08:09 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1572213002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1572213002/80001
4 years, 11 months ago (2016-01-14 05:34:00 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:80001)
4 years, 11 months ago (2016-01-14 06:33:48 UTC) #16
commit-bot: I haz the power
4 years, 11 months ago (2016-01-14 06:35:05 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/61d8b73f3d3891991f2afcd27fc40f5b09448e27
Cr-Commit-Position: refs/heads/master@{#369349}

Powered by Google App Engine
This is Rietveld 408576698