Status Update
Comments
ro...@gmail.com <ro...@gmail.com> #2
An observation.
If you split your editor, it happens more likely.
ro...@gmail.com <ro...@gmail.com> #3
Still very slow in Hedgehog 10
It is not neccessarily the editor split function that causes this issue, but it slows it more when in use.
ro...@gmail.com <ro...@gmail.com> #4
Added an example picture on how "Performing code analysis" is shown when editor is splitted.
I actually expect that it is necessary with only one process checking one file. Can image that there might be concurrent / "wait-for" problems rising when two or more processes is checking the same file.
dy...@google.com <dy...@google.com>
ju...@google.com <ju...@google.com>
gh...@google.com <gh...@google.com> #5
Sorry this bug was in limbo; it was unassigned from android-devtools-triage@
, then moved and subsequently lost.
Almost all the thread dumps involve ComposePreviewRunLineMarkerContributor
:
...
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils.analyze(ResolutionUtils.kt:135)
...
at org.jetbrains.uast.kotlin.KotlinUAnnotationBase$qualifiedName$2.invoke(KotlinUAnnotation.kt:28)
...
at com.android.tools.idea.annotations.AnnotatedMethodsFinderKt.isAnnotatedWith(AnnotatedMethodsFinder.kt:206)
at com.android.tools.idea.compose.preview.PreviewElementFinderUtilsKt.isComposable(PreviewElementFinderUtils.kt:308)
...
at com.android.tools.idea.compose.preview.PreviewElementFinderUtilsKt.getPreviewNodes(PreviewElementFinderUtils.kt:126)
at com.android.tools.idea.compose.preview.PreviewElementFinderUtilsKt.getPreviewElements(PreviewElementFinderUtils.kt:114)
at com.android.tools.idea.compose.preview.PreviewElementFinderUtilsKt.getPreviewElements$default(PreviewElementFinderUtils.kt:113)
at com.android.tools.idea.compose.preview.PreviewElementFinderUtilsKt.hasPreviewElements(PreviewElementFinderUtils.kt:98)
at com.android.tools.idea.compose.preview.ComposePreviewElementKt.isValidComposePreview(ComposePreviewElement.kt:162)
at com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunLineMarkerContributor.getInfo(ComposePreviewRunLineMarkerContributor.kt:48)
at com.intellij.execution.lineMarker.RunLineMarkerProvider.getLineMarkerInfo(RunLineMarkerProvider.java:63)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:183)
...
It's hard to say for certain whether ComposePreviewRunLineMarkerContributor
is the primary issue (there are other threads running Kotlin resolve too). Still, I plan to defer ComposePreviewRunLineMarkerContributor
to run after the main Kotlin highlighting pass in order to reduce analysis lock contention and better reuse cached symbol resolution. Another idea (for compose folks to consider) is to check the "short" name of each annotation before attempting to resolve the fully qualified name. This would probably involve making hasPreviewElements()
work with the KtNamedFunction
directly, since I don't think UAST exposes the annotation short-name.
Downgrading to P2 for now since this seems like an isolated / uncommon case.
gh...@google.com <gh...@google.com> #6
I uploaded ag/25118574 for the "defer ComposePreviewRunLineMarkerContributor" part. Now over to Amaury in case we want to optimize ComposePreviewRunLineMarkerContributor
further (e.g. avoid resolving annotation fq names in some cases).
an...@google.com <an...@google.com> #8
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 Iguana | 2023.2.1 Canary 13
- Android Gradle Plugin 8.3.0-alpha13
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!
Description
####################################################
Please provide all of the following information, otherwise we may not be able to route your bug report.
####################################################
1. Describe the bug or issue that you're seeing.
2. Attach log files from Android Studio
2A. In the IDE, select the Help..Collect Logs and Diagnostic Data menu option.
2B. Create a diagnostic report and save it to your local computer.
2C. Attach the report to this bug using the Add attachments button.
3. If you know what they are, write the steps to reproduce:
3A.
3B.
3C.
In addition to logs, please attach a screenshot or recording that illustrates the problem.
For more information on how to get your bug routed quickly, see
Build: AI-231.9011.34.2311.10335024, 202306160801
AI-231.9011.34.2311.10335024, JRE 17.0.6+0-b2043.56-10027231x64 JetBrains s.r.o., OS Windows 11(amd64) v10.0 , screens 2400.0x1350.0, 1920.0x1080.0, 1920.0x1080.0, 768.0x1366.0
AS: Hedgehog | 2023.1.1 Canary 9
Kotlin plugin: 231-1.9.0-RC-release-336-AS8770.65
Android Gradle Plugin: 8.2.0-alpha09
Gradle: 8.2
Gradle JDK: JetBrains Runtime version 17.0.6
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)
Source: send_feedback_icon```
IDE gets very sluggish after some time writing. I see many freeze logs in the log folder.
Please check attached logs.