Skip to content

Resolves a "Slow operations are prohibited on EDT" exception #8457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2025

Conversation

jwren
Copy link
Member

@jwren jwren commented Aug 13, 2025

This resolves #8448

Additional work may be needed to limit the number of read actions by the plugin, see #8242

This resolves flutter#8448

Additional work may be needed to limit the number of read actions by the plugin, see flutter#8242
@jwren jwren requested review from pq and helin24 August 13, 2025 23:44
Copy link
Collaborator

@pq pq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🎉

if (FlutterSdk.forPath(path) != null) {
pathsToShow.add(FileUtil.toSystemDependentName(path));
// Now, run the slow operation (finding valid SDK paths) on a background thread.
ApplicationManager.getApplication().executeOnPooledThread(() -> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! I'll have to read up on how this thread pool is managed and what kinds of operations are best run on it. Maybe this is the approach we should take elsewhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is part of it, I was reading up on coalesceBy, see the message in #8242, which I think will be the right approach.

@jwren jwren merged commit 53d3b61 into flutter:master Aug 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow operations are prohibited on EDT - FlutterSdk.java:138
2 participants