• Mohamed Heikal's avatar
    Monochrome: Unroll loops in onResourcesLoaded() · 9b4f3568
    Mohamed Heikal authored
    In (crrev.com/952097), a runtime check was added to Resource arrays such
    that only resource ids that start with "0x7f" ie. application resources
    (vs "0x01" which are system resources) are to have their package id
    transformed. This lead to startup performance degradation.
    
    This CL changes this check to a compile time check and unrolls the
    arrays at compile time (when packaging resources and creating the R.java
    file we have all the resource ids already).
    
    Bug: 821425
    Change-Id: Id977901d7ecaf24df76806ce9c39a38f40a57061
    Reviewed-on: https://chromium-review.googlesource.com/974079
    Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
    Commit-Queue: agrieve <agrieve@chromium.org>
    Reviewed-by: default avataragrieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#545102}
    9b4f3568
process_resources.py 33.6 KB