Status Update
Comments
hs...@google.com <hs...@google.com> #2
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Canary 3
- Android Gradle Plugin 8.8.0-alpha03
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
it...@gmail.com <it...@gmail.com> #3
Please find the required data below: Android Studio version: Android Studio Ladybug Feature Drop | 2024.2.2 OS type and version: Microsoft Windows 10 Pro (10.0.19045 Build 19045)
I didn't have screenshots now. The issue I faced is that, when changing some code in the XML file, it take more time to reflect in the preview than usual. And sometimes, after opening the project, the preview takes more time to load and shows a loader with message 'Initializing'.
ha...@google.com <ha...@google.com>
ra...@google.com <ra...@google.com> #4
There is a frequent exception logged as a warning, in conjunction with "Recomputed N fields for..." logging (sometimes duplicated for the same fqn? see the 464 fields below):
2025-01-09 18:20:05,404 [28441383] INFO - #o.j.a.a.InnerRClassBase - Recomputed 987 fields for ResourceRepositoryInnerRClass{fqn=com.sensei.engrow.R.string, repository=AppResourceRepository@709C7B72}
2025-01-09 18:20:19,922 [28455901] INFO - #com.android.ddmlib - Device 'motorola-moto_g52-ZD22262ND3' jdwp process '17149' is now known as pkg='com.sensei.engrow.alpha.ro.debug' (proc='com.sensei.engrow.alpha.ro.debug')
2025-01-09 18:23:02,900 [28618879] INFO - #o.j.a.a.InnerRClassBase - Recomputed 464 fields for ResourceRepositoryInnerRClass{fqn=com.sensei.engrow.R.layout, repository=AppResourceRepository@709C7B72}
2025-01-09 18:23:02,906 [28618885] INFO - #o.j.a.a.InnerRClassBase - Recomputed 464 fields for ResourceRepositoryInnerRClass{fqn=com.sensei.engrow.R.layout, repository=AppResourceRepository@573BFD3D}
2025-01-09 18:23:02,908 [28618887] INFO - #o.j.a.a.InnerRClassBase - Recomputed 169 fields for ResourceRepositoryInnerRClass{fqn=com.sensei.engrow.test.R.layout, repository=TestAppResourceRepository@13D0D7B5}
2025-01-09 18:23:03,284 [28619263] INFO - #c.i.d.JVMResponsivenessMonitor - JVM responsiveness: {avg: 2520.7322222222224, 50%: 1900, 99%: 15303, 99.9%: 26911, max: 35327 }ns, x{3600 measurements}
2025-01-09 18:23:20,756 [28636735] WARN - #o.j.k.i.b.p.ModuleInfoProvider - Could not find correct module information
org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments: Analyzing element of type class com.intellij.psi.impl.source.PsiJavaFileImpl in non-physical file of type class com.intellij.psi.impl.source.PsiJavaFileImpl
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProvider.collectByElement(ModuleInfoProvider.kt:193)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProvider.access$collectByElement(ModuleInfoProvider.kt:73)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProvider$collect$1.invoke(ModuleInfoProvider.kt:108)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProvider$collect$1.invoke(ModuleInfoProvider.kt:107)
at org.jetbrains.kotlin.idea.base.util.SeqKt$seq$$inlined$Sequence$1.iterator(Sequences.kt:682)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProviderKt$unwrap$1$iterator$1.<init>(ModuleInfoProvider.kt:488)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProviderKt$unwrap$1.iterator(ModuleInfoProvider.kt:487)
at kotlin.sequences.SequencesKt___SequencesKt.firstOrNull(_Sequences.kt:167)
at org.jetbrains.kotlin.idea.base.projectStructure.ModuleInfoProviderUtils.firstOrNull(ModuleInfoProviderUtils.kt:43)
I suspect the non-physical PsiJavaFileImpl is an R class. I found
As for preview rendering, I tried opening four layout files from Signal-Android and the majority of time is spent in reflection:
Eugene, do you know which JBR has the fix for
ya...@google.com <ya...@google.com>
ya...@google.com <ya...@google.com> #5
It was only 21.0.3b509.4 version with a fix: from Ladybug.1 Canary 1 till Canary 8
We lost patch in subsequent JBR update. ouch.
ra...@google.com <ra...@google.com> #6
PS. Here's the async-profiler flame graph of the same:
FieldStreamBase::next
calls, as a result of upstream commit
In the above flame graph, loadIdsFromResourceClass
has 26,531 CPU samples (42.19%). Here's the same code running on JBR17, only 3,010 CPU samples (8.81%):
ra...@google.com <ra...@google.com> #7
Over to Diego. We patched fieldDescriptor::reinitialize
-> InstanceKlass::field
-> FieldStreamBase::next
result in quadratic complexity iterating over the field stream.
di...@google.com <di...@google.com> #9
The fix for R class loading has been merged into M.1 and LB.2.
an...@google.com <an...@google.com> #10
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat Feature Drop | 2024.3.2 Canary 3
- Android Gradle Plugin 8.10.0-alpha03
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
an...@google.com <an...@google.com> #11
The fixes for this issue are now also available in:
- Android Studio Meerkat | 2024.3.1 RC 1
- Android Gradle Plugin 8.9.0-rc01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
an...@google.com <an...@google.com> #12
The fixes for this issue are now also available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Patch 1
- Android Gradle Plugin 8.8.1
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Description
I was using the version 'Ladybug | 2024.2.1' of Android studio. And then I have updated it to 'Ladybug Feature Drop | 2024.2.2' and now everything is slow. Code completion, UI preview for XML files and everything else is taking up more time. If possible, please check and fix this issue and provide an update for it.
Build: AI-242.23726.103.2422.12816248, 202412180703
AS: Ladybug Feature Drop | 2024.2.2
AI-242.23726.103.2422.12816248, JRE 21.0.4+-12508038-b607.1x64 JetBrains s.r.o., OS Windows 10(amd64) v10.0 , screens 1920x1080 (150%)
Android Gradle Plugin: 4.1.1
Gradle: 7.0
Gradle JDK: Amazon Corretto 11.0.19
NDK: from local.properties: (not specified), latest from SDK: (not found)
CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
```