usb_ids_gen.cc is vacuously compiled on Android. |
|||
Issue descriptionusb_ids_gen.cc is a generated 20K-line file containing USB ids and strings. For Android, its contents are compiled, but mostly not linked into the final APK. - For Supersize archive, only ~150 / 15000 strings found appear in the final APK. This adds 10's of seconds to Supersize executation. - This wastes compile resources. We should just skip compiling the unused data for Clank builds.
,
Oct 27 2017
Assigning to myself. Turns out usb_util.cc already excludes usb_ids.h for Android. So it suffices to take a step further: edit BUILD.gn to and exclude compile for Android. Doing this reduces Supersize archive (x86) on my machine from ~45s to ~31s.
,
Oct 27 2017
sgtm, send me a patch.
,
Oct 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2cb0922daf3077ef449be6728742e0f5396481b4 commit 2cb0922daf3077ef449be6728742e0f5396481b4 Author: Samuel Huang <huangs@chromium.org> Date: Mon Oct 30 18:37:00 2017 [USB] Exclude usb_ids.* compilation for Chrome under Android. Clank build excludes usb_ids.*, but the source files (inlcude the giant file usb_ids_gen.cc) still got compiled, even though its results are not included in the final APK. This adds unnecessary work for Clank builds, and creates overhead to Supersize archive command. This CL removes these vacuous usb_ids.* compilation under Android. This speeds up Supersize archive by about 20% (and probably shaves seconds from Clank build). Bug: 779162 Change-Id: I4e4a9eb4274bfa9d298a5ce887179629a5cb6b7f Reviewed-on: https://chromium-review.googlesource.com/740688 Commit-Queue: Reilly Grant <reillyg@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#512538} [modify] https://crrev.com/2cb0922daf3077ef449be6728742e0f5396481b4/device/BUILD.gn [modify] https://crrev.com/2cb0922daf3077ef449be6728742e0f5396481b4/device/usb/BUILD.gn
,
Oct 30 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by hua...@chromium.org
, Oct 27 2017