Status Update
Comments
vi...@google.com <vi...@google.com>
rp...@google.com <rp...@google.com>
ju...@google.com <ju...@google.com>
aa...@google.com <aa...@google.com> #2
1. Android Studio version and OS type and version
2. Screenshots or videos of the issue
3. idea.log file (select Help > Show Log in Finder / Explorer)
4. Thread dumps if the issue is a freezing or non-responding UI.
For more information on what’s needed and how to obtain this information please read the guide at
ad...@google.com <ad...@google.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'.
[Deleted User] <[Deleted User]> #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
ad...@google.com <ad...@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.
sp...@google.com <sp...@google.com>
sp...@google.com <sp...@google.com>
an...@google.com <an...@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%):
Description
Build: AI-193.6911.18.40.6514223, 202005201507,
AI-193.6911.18.40.6514223, JRE 1.8.0_242-release-1644-b3-6222593x64 JetBrains s.r.o, OS Linux(amd64) v5.7.1-1-default, screens 2560x1440, 1920x1080
AS: 4.0; Kotlin plugin: 1.3.72-release-Studio4.0-1; Android Gradle Plugin: 4.0.0; Gradle: 6.1.1; NDK: from local.properties: (not specified), latest from SDK: 19.2.5345600; LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: 3.6.0-rc2, from PATH: 3.17.3
IMPORTANT: Please read