flutter / flutter/devtools

[devtools]blocked main thread events are not shown in performance overlay or performance monitoring tools

未关闭
#4,508 4 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
has reproducible steps P2 screen: performance
主要语言
Dart
星标
1.7k
派生
404
平均合并
6 天 17 小时
30 天内合并 PR
18

描述

# Issue :
1. A blocked main thread does not trigger any warnings in default performance monitoring utilities provided by Flutter.

# Overview:
When an application blocks the main thread with a computation heavy operation, the user has a fully frozen screen. When the computation is completed and the main thread is unblocked, the app returns to the normal responsive state (nothing shocking here).

This "unresponsive" state is easy to detect when running/testing the application with a human in the loop. However, when using the provided programmatic testing toolchain, this "unresponsive" state does not trigger any issues on performance tests using the `traceAction`, `tracePerformance` or any `TimelineSummary` based diagnostics. This behavior is present in the web based performance tooling and the VSCode tooling as well.

# Example:
I have a small project outlining my understanding of my issue [here](https://github.com/peet0r/blocked_main).

# Things to note:
- I admit that this issue could be a result of my ignorance to a "deeper level” knowledge of Flutter testing methods. If so, I would love to help extend the Flutter docs with more performance testing content.

贡献指南

打开贡献指南

调研方向

首先在链接的 blocked_main 示例中复现主线程被阻塞的场景,并比较 traceAction、tracePerformance 和 TimelineSummary 诊断的结果。还要检查基于 Web 的性能工具和 VSCode 工具;当阻塞主线程的事件产生警告,或以其他方式出现在相关性能诊断中时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
dart
领域
observability, performance, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。