• Andrew Grieve's avatar
    Limit heap size of when running R8 / D8 · a9721228
    Andrew Grieve authored
    Adds -Xmx1G to limit heap size to 1GB.
    
    My local test of R8 on MonochromePublic.aab had a peak RSS
    of 1.8GB with this flag and 8GB without it.
    
    Does not seem to cause the command to run measurably slower.
    
    I found that the r8 wrapper script in AOSP uses this same flag and
    so does the Android lint wrapper script.
    
    Bug: 1098333
    Change-Id: Icca79bf6c1e9c8f003f613c178983f63cf9fbf04
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2348018
    Commit-Queue: Sam Maier <smaier@chromium.org>
    Auto-Submit: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: default avatarSam Maier <smaier@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#796806}
    a9721228
dex.py 20.3 KB