Android: Use fine-grain dependencies for desugar

D8 provides a list of dependent/dependency relationships for desugaring.
When a file changes (whether within the target or on the classpath), the
classes within the target that implement it will need to be re-desugared
even though those classes did not change. Previously we would re-desugar
all classes within the target. Now we can just re-desugar (i.e. re-dex)
only the necessary ones.

This provides a build speed boost primarily due to avoiding the need to
run any desugaring (either bazel desugar or D8 desugar) when a change
does not require it.

A follow-up CL will deal with the DexSplitter issue for monochrome and
trichrome bundle builds.

The stats below are timed with android_fast_local_dev=true.
Before:
chrome_java_nosig: 34.5s avg (34.1s, 35.2s, 34.2s, 34.4s)
chrome_java_sig: 36.2s avg (35.0s, 37.0s, 36.4s, 36.4s)
chrome_java_res: 39.8s avg (39.8s, 39.9s, 39.6s, 40.0s)
base_java_nosig: 46.0s avg (46.9s, 46.0s, 45.0s, 46.1s)
base_java_sig: 107.2s avg (106.8s, 106.9s, 107.7s, 107.3s)

After:
chrome_java_nosig: 31.6s avg (32.5s, 31.1s, 31.7s, 31.2s)
chrome_java_sig: 34.0s avg (34.2s, 34.0s, 33.8s, 34.1s)
chrome_java_res: 39.8s avg (39.8s, 39.6s, 39.9s, 39.8s)
base_java_nosig: 22.7s avg (22.5s, 23.1s, 22.3s, 22.8s)
base_java_sig: 101.3s avg (102.0s, 101.2s, 100.9s, 101.2s)

Bug: 1015559
Change-Id: Idf4e05bf41583b2ea7d4f1d3855b508be56eea94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633323
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844873}
3 files changed
tree: 525239aff7f8373ab7009069a18c09f7166ee0b9
  1. android_webview/
  2. apps/
  3. ash/
  4. base/
  5. build/
  6. build_overrides/
  7. buildtools/
  8. cc/
  9. chrome/
  10. chromecast/
  11. chromeos/
  12. cloud_print/
  13. codelabs/
  14. components/
  15. content/
  16. courgette/
  17. crypto/
  18. dbus/
  19. device/
  20. docs/
  21. extensions/
  22. fuchsia/
  23. gin/
  24. google_apis/
  25. google_update/
  26. gpu/
  27. headless/
  28. infra/
  29. ios/
  30. ipc/
  31. jingle/
  32. media/
  33. mojo/
  34. native_client_sdk/
  35. net/
  36. pdf/
  37. ppapi/
  38. printing/
  39. remoting/
  40. rlz/
  41. sandbox/
  42. services/
  43. skia/
  44. sql/
  45. storage/
  46. styleguide/
  47. testing/
  48. third_party/
  49. tools/
  50. ui/
  51. url/
  52. weblayer/
  53. .clang-format
  54. .clang-tidy
  55. .eslintrc.js
  56. .git-blame-ignore-revs
  57. .gitattributes
  58. .gitignore
  59. .gn
  60. .vpython
  61. .vpython3
  62. .yapfignore
  63. AUTHORS
  64. BUILD.gn
  65. CODE_OF_CONDUCT.md
  66. codereview.settings
  67. DEPS
  68. DIR_METADATA
  69. ENG_REVIEW_OWNERS
  70. LICENSE
  71. LICENSE.chromium_os
  72. OWNERS
  73. PRESUBMIT.py
  74. PRESUBMIT_test.py
  75. PRESUBMIT_test_mocks.py
  76. README.md
  77. WATCHLISTS
README.md

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure .

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.