Commit 310dd4b6 authored by Andrew Grieve's avatar Andrew Grieve Committed by Chromium LUCI CQ

mojom_parser.py: Skip GC / destructors on exit

Noticed a significant delay between "Finished" log message and process
terminating. Turns out this call to _exit(0) saves 2 seconds off of a
4.6 second run for content_common_mojo_bindings.

Bug: 1143399
Change-Id: I0beb911033ddb7f96027796afac0c65ac5306df2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611950Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840671}
parent 171abf52
......@@ -380,6 +380,9 @@ already present in the provided output root.""")
_ParseMojoms(mojom_files, input_roots, output_root, args.enabled_features,
module_metadata, allowed_imports)
logging.info('Finished')
# Exit without running GC, which can save multiple seconds due the large
# number of object created.
os._exit(0)
if __name__ == '__main__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment