summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index a2d07a5a7e..b98f704af3 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -299,7 +299,13 @@ class ClassLinker::VisiblyInitializedCallback final
}
}
- static constexpr size_t kMaxClasses = 16;
+ // Making classes initialized in bigger batches helps with app startup for
+ // apps that initialize a lot of classes by running fewer checkpoints.
+ // (On the other hand, bigger batches make class initialization checks more
+ // likely to take a slow path but that is mitigated by making partially
+ // filled buffers visibly initialized if we take the slow path many times.
+ // See `Thread::kMakeVisiblyInitializedCounterTriggerCount`.)
+ static constexpr size_t kMaxClasses = 48;
ClassLinker* const class_linker_;
size_t num_classes_;