diff options
author | 2024-04-03 15:00:46 +0000 | |
---|---|---|
committer | 2024-04-05 12:51:04 +0000 | |
commit | 4e6db6efb36ab9cb9a5990346e77d7976e1b3c66 (patch) | |
tree | fdbee9887db4f972908d34ae6160e1563ffed0bb /libnativebridge/tests/NativeBridgeTestCase7.cpp | |
parent | 9486862224c0c3b99813b9a249c4af97452e505f (diff) |
Faster annotations processing in `ClassLinker::LoadClass()`.
Iterate annotations alongside other method data, using the
fact that both are ordered by method index. We use separate
iterators for loading direct and virtual methods.
For a test class with 500 unannotated static methods and
200 @NeverCompile static methods, this change reduces the
time needed by `ClassLinker::LoadClass` approximately 2x.
For a test class with twice that many methods, the time
without this change increases by ~3x but with this change
the time increases by ~2x, showing nice linear scaling.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 329196666
Change-Id: I800b8e8e9f9e5a4fbfbda1361f99feb8c43ff1d5
Diffstat (limited to 'libnativebridge/tests/NativeBridgeTestCase7.cpp')
0 files changed, 0 insertions, 0 deletions