Disable encoded static initialization
Encoded static initialization currently requires fixing up intered
strings. This fix up process causes app startup to be ~10ms longer.
Disable the initialization and fixup process until there is a faster
way to fix up the interned strings.
Bug: 70734839
Test: test-art-host
Change-Id: I847d0bd9a362243241c93b115081a67faab7bfc1
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index bd3a145..5360476 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -2317,6 +2317,7 @@
// The boot image case doesn't need to recursively initialize the dependencies with
// special logic since the class linker already does this.
can_init_static_fields =
+ ClassLinker::kAppImageMayContainStrings &&
!soa.Self()->IsExceptionPending() &&
is_superclass_initialized &&
NoClinitInDependency(klass, soa.Self(), &class_loader);