flutter / flutter/flutter-intellij

[perf] migrate slow operations to non-blocking calls

Open
#8,089 2 comments 0 reactions 1 assignee Claimed by @pq View on GitHub
code-health P1 performance tech debt
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

We're doing a lot of long-running processing on the UI thread which is

1. hurting performance, and
2. spamming the logs (distracting users as in https://github.com/flutter/flutter-intellij/issues/7151, https://github.com/flutter/flutter-intellij/issues/7641 and https://github.com/flutter/flutter-intellij/issues/8083)

We've had issues safely making the change to use the prescribed `ReadAction.nonBlocking` APIs (see for example: https://github.com/flutter/flutter-intellij/issues/7792) so we'll want to proceed thoughtfully.

This issue will stand as a tracker for migrations.

Some resources:

* 📖 [plugin docs](https://plugins.jetbrains.com/docs/intellij/threading-model.html#avoiding-ui-freezes)
* 📖 [ReadAction.java](https://github.com/JetBrains/intellij-community/blob/idea/251.23774.435/platform/core-api/src/com/intellij/openapi/application/ReadAction.java)

---

🚧🚧🚧

Blocking calls to migrate:

- [x] #8093
- [x] https://github.com/flutter/flutter-intellij/pull/8094
- [x] https://github.com/flutter/flutter-intellij/pull/8095
- [x] `io.flutter.bazel.WorkspaceCache#refresh`
- [x] https://github.com/flutter/flutter-intellij/issues/8083
- [ ] `io.flutter.run.SdkRunConfig#getState`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.