[FR] Make it easier to identify performance bottlenecks in app

未关闭
#9,606 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
dart

调研方向

先从 Performance Panel 现有的 widget 构建、布局和绘制跟踪开始,然后追踪 Flutter engine 事件如何到达 Dart VM Service 的 ring buffer。该 issue 提出了两个范围截然不同的替代方案,因此必须先就完成标准和实现入口达成一致,之后才能开始工作。

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

描述

cost: high new feature P3 screen: performance
Description

A user is requesting a way to easily find the widget/s responsible for performance issues in their app.

The Performance Panel currently supports tracking widget builds, layouts, and paints to help users diagnose where their app is experiencing bottlenecks.

However, if the app has high frame rates, they can experience data loss in DevTools because the perf events overflow the ring buffer before they can analyze them.

Possible solutions

1. Table of slowest widget builds, layouts, or paints.

Along with displaying the data in the flame chart, we could also sort the data and display the slowest phases at the top of a table to help users quickly identify where their app is experiencing issues.

Estimated scope: S/M (1 week - 1 month)

2. Disabling widgets from the performance view

The user suggested a possible solution of disabling widgets from the performance view. This is a significantly more challenging request. Currently, the Flutter engine is responsible for emitting the build, layout, and paint events. The Dart VM Service listens to these events, and adds them to a ring buffer. The primary challenge here is communicating with the Flutter engine to not emit the events for certain widgets, either with a service extension registered on the framework, or perhaps an annotation that users can add to their widget source code.

Estimated scope: XL (quarter+)


See original request here

主要语言
Dart
星标
1.7k
派生
420
平均合并
3 天 11 小时
30 天内合并 PR
29

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

flutter/devtools 的其他 Issue

查看 flutter/devtools 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 发到你的邮箱

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