Unity-Technologies / Unity-Technologies/UnityDataTools
Support calculating TypeTree overhead
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 821
- 派生
- 71
- 平均合并
- 3 小时 13 分钟
- 30 天内合并 PR
- 9
描述
Some AssetBundle or content directory builds can have a high overhead from the TypeTree data in the SerializedFile header.
This is particularly true if there is a very high granularity of files, and the project contains large MonoBehaivours (large in term of serialization description, the data size is not important)
This task is to update UnityDataTool to make it easier to "see" this overhead and pinpoint details about it (such as the existence of large MonoBehaviours, or widely repeated types). We do expose the raw information about TypeTrees through the serializd-file command, but it is very low level so far.
Option 1: update the Analysis database and capture the data during analysis so that TypeTrees have dedicated table in the database.
From the raw table data it should be made clear how to extract the overall size and duplication statistics (either based on queries in the docs or a custom view)
A POC already exists in this branch:
https://github.com/Unity-Technologies/UnityDataTools/compare/main...typetreeanalysis
That branch is out of data with the recent changed in UnityDataTool and probably needs some design adjustments, but can be a great starting point.
Option 2: update the serialized-file command to print TypeTree stats information in a convenient summary format, and to publish example in the documentation for how to do analysis based on that raw data. E.g. example script.
Option 3: Really low level would be to make use of the data already exposed by serialized-file and have a script that show how to populate that into a dedicated database.
Because the data could get pretty large for large builds i think the first is probably best.
Question: how should we handle a build that has external typetrees? In that case the serialized file have no typetrees so the new tables would be empty. There is probably minimal value to calculating a lot of stats for this case, because by design they are already deduplicated.
Detail: For builds with external typetrees then we can potentially skip creating the typetree tables and views (to avoid extra noise in the analyze database for builds where those stats don't apply)
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查现有的 typetreeanalysis 分支,以及 serialized-file 命令提供的原始 TypeTree 数据。比较 analysis-database、summary-output 和 scripting 选项,包括应如何处理外部 TypeTree;当选定的方法能更容易地分析 TypeTree 开销和重复的细节时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp
- 领域
- database, tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100