Migrate to requesting Perfetto timelines containing interned strings from the VM Service
- 主要语言
- Dart
- 星标
- 1.7k
- 派生
- 404
- 平均合并
- 6 天 17 小时
- 30 天内合并 PR
- 18
描述
@mraleph has made it possible for the VM Service to return Perfetto-format timeline protos with interned strings, which can be much smaller than protos without interned strings. A measurement that he recorded showed that a timeline containing 60k slices went from 15MB to 5MB once interned strings were used. The Perfetto trace viewer knows how to decode interned strings, but since DevTools reads the data in timeline protos itself, it will need to be migrated before it can take advantage of the size reduction.
To migrate, DevTools needs to upgrade to `package:vm_service_protos 2.0.0`, and then implement deinterning as done in https://github.com/dart-lang/sdk/blob/cfeda654176d7c2cf006eeef269a458cdf977f32/pkg/vm_service/test/get_perfetto_vm_timeline_rpc_test.dart#L42. To test the migration, the VM flag `--intern-strings-when-writing-perfetto-timeline` makes it so that `getPerfettoVMTimeline` VM Service RPCs return protos with interned strings. Once the migration is complete, `--intern-strings-when-writing-perfetto-timeline` can become the VM's default behaviour.
贡献指南
调研方向
升级到 package:vm_service_protos 2.0.0,并从 DevTools 对 getPerfettoVMTimeline RPC 的处理入手。使用所引用的 vm_service 测试来进行 deinterning,并使用 --intern-strings-when-writing-perfetto-timeline 运行;当 DevTools 能正确读取包含 interned strings 的时间线时即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- dart
- 领域
- devtools, performance
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100