spacedriveapp/spacedrive at 6dfeccf · static read-only analysis · why-not-rust method 2.0spacedriveapp/spacedrive @ 6dfeccf · 静态只读分析 · why-not-rust 方法 2.0
Repository: github.com/spacedriveapp/spacedrive at commit 6dfeccf2113039e35f2ce735f945e70dc3e4ea45, shallow clone, 2,919 tracked files. Scope: the whole repository, with core/ as the assessed engine and core/src/service/{network,sync} as the subsystem under scope review. Sampling: 240,726 lines of Rust across 1,166 files, of which core/ is 197,230 across 901, crates/ 24,099 across 153, apps/ 16,084 across 74, extensions/ 1,293 and xtask/ 2,020. The UI is 48,279 lines of .tsx across 252 files and 23,674 of .ts across 153; the .ts files were checked and are TypeScript, not translation XML. 3,211 lines of Swift across 17 files, and 2,801 lines of Python across the 11 adapters under adapters/. Line counts are raw lines from `git ls-files -z <glob> | xargs -0 cat | wc -l`; comments and blanks are included and no vendored tree exists in this repository. The 36,463-line P2P and sync figure is core/src/service/{network,sync,file_sync,sidecar_sync} plus core/src/infra/sync plus core/src/ops/{network,sync,file_sync}, on the same raw-line basis as the 197,230 it is compared against; adding core/src/device and core/src/ops/{devices,redundancy} would make it 38,137. Unsafe counts are occurrences from `grep -o '\bunsafe\b'`, not matching lines, and comments were not excluded: 220 occurrences in 39 files, 109 of them in crates/ffmpeg. Performance evidence comes from artifacts the project committed itself under core/benchmarks/results: 18 JSON files across three scenarios and two disks, plus whitepaper_metrics.csv. The two runs this report turns on are shape_large on internal SSD, Apple M3 Max, 16 physical cores, 48 GB, 100,000 files and 16,507 directories: discovery-only total_s 60.15, content-identification total_s 1,340.8. The GB/s column in that CSV is total logical file size divided by duration, not bytes read; content_identity.rs reads at most 102,400 bytes per file, so the true read rate in that phase is at most 7.6 MB/s, about 1,160 times lower than the 8.86 GB/s the CSV reports. The benchmark tree is generated sparse, which makes those durations optimistic rather than pessimistic. Amdahl inputs: share 0.045 (60.15 / 1,340.8), kernel_speedup 10, boundary 0, target 13.4 (~1K files/sec at docs/core/indexing.mdx:388 over 74.58 measured), giving 1.042x end-to-end and a 1.047x ceiling. Commit, release and author history came from the GitHub REST API on the main branch: `gh api "repos/spacedriveapp/spacedrive/commits?sha=main&since=...&until=..."` with per-quarter windows, and `gh api repos/spacedriveapp/spacedrive/releases`. No build, test, benchmark or execution of the app was performed, and nothing was written inside the clone. Objective: no migration RFC was supplied, so the assessment takes the proposal the repository states about itself. User-supplied facts: none. G4 is UNKNOWN rather than FAIL because 858 commits landed in 2025Q4 and the repository is not archived; the decision turns on G2 and G3, which fail on measured artifacts the project published. This is a structured decision protocol, not a statistical predictor.仓库:github.com/spacedriveapp/spacedrive,commit 6dfeccf2113039e35f2ce735f945e70dc3e4ea45,shallow clone,2,919 个纳管文件。范围:整个仓库,被评估的引擎是 core/,被审视范围的子系统是 core/src/service/{network,sync}。采样:Rust 240,726 行、1,166 个文件,其中 core/ 197,230 行 901 个文件,crates/ 24,099 行 153 个文件,apps/ 16,084 行 74 个文件,extensions/ 1,293 行,xtask/ 2,020 行。界面是 252 个 .tsx 文件 48,279 行、153 个 .ts 文件 23,674 行;.ts 文件逐一确认过是 TypeScript,不是翻译用的 XML。Swift 17 个文件 3,211 行,adapters/ 下 11 个适配器共 2,801 行 Python。行数是 `git ls-files -z <glob> | xargs -0 cat | wc -l` 的原始行数,含注释和空行;这个仓库里没有内置的第三方源码树。36,463 行的 P2P 与 sync 口径是 core/src/service/{network,sync,file_sync,sidecar_sync} 加 core/src/infra/sync 加 core/src/ops/{network,sync,file_sync},和用来对比的 197,230 行同一个原始行口径;如果再算上 core/src/device 和 core/src/ops/{devices,redundancy},是 38,137 行。unsafe 是 `grep -o '\bunsafe\b'` 的出现次数,不是匹配行数,也没有剔除注释:39 个文件里 220 次,其中 109 次在 crates/ffmpeg。性能证据来自项目自己提交进 core/benchmarks/results 的材料:三个场景、两种盘,共 18 个 JSON,加一份 whitepaper_metrics.csv。决定性的一对是内置 SSD 上的 shape_large:Apple M3 Max、16 个物理核、48 GB,100,000 个文件、16,507 个目录,只做 discovery 的 total_s 是 60.15,做 content-identification 的 total_s 是 1,340.8。那份 CSV 里的 GB/s 列是文件逻辑总大小除以时长,不是实际读取字节;content_identity.rs 每个文件最多读 102,400 字节,所以这一阶段真实读取速率最高 7.6 MB/s,比 CSV 写的 8.86 GB/s 低大约 1,160 倍。基准目录树是稀疏生成的,所以这些时长是偏乐观而不是偏悲观。Amdahl 输入:share 0.045(60.15 / 1,340.8)、kernel_speedup 10、boundary 0、target 13.4(docs/core/indexing.mdx:388 的 ~1K files/sec 除以实测 74.58),得到端到端 1.042×、上限 1.047×。commit、release 和作者历史来自 GitHub REST API 的 main 分支:`gh api "repos/spacedriveapp/spacedrive/commits?sha=main&since=...&until=..."` 按季度取窗口,以及 `gh api repos/spacedriveapp/spacedrive/releases`。没有做任何构建、测试、基准,也没有运行这个应用,clone 里没有写入任何东西。目标:没有人给出迁移 RFC,因此按仓库自己陈述的方案评估。用户提供的事实:无。G4 记 UNKNOWN 而不是 FAIL,因为 2025Q4 有 858 个 commit 落地,而且仓库没有归档;决策落在 G2 和 G3 上,这两道门是在项目自己公布的实测材料上失败的。这是一套结构化决策流程,不是统计预测器。
| What we don't know证据缺口 | What it would change会改变什么 |
| A Deep-mode benchmark for the thumbnail path缩略图路径的 Deep 模式基准 | Three scenarios are committed and none covers media. While that holds, the thumbnail half of G2 is UNKNOWN and no claim about media performance can be authorized in either direction.提交进来的是三个场景,没有一个覆盖媒体。这种状态下,G2 里缩略图那一半是 UNKNOWN,关于媒体性能的主张两个方向都授权不了。 |
| Frame time and input latency for the explorer UIexplorer 界面的帧时间与输入延迟 | 39,926 lines of TSX in a system webview decide what users call fast. Until someone measures it, the GPUI option stays UNKNOWN rather than excluded.系统 webview 里 39,926 行 TSX,决定了用户口中的「快」。在有人量它之前,GPUI 那个方案停在 UNKNOWN,不是被排除。 |
| A benchmark on a tree with real bytes在真实字节的目录树上跑一次基准 | The committed recipe writes sparse files, so 13.4 ms per file is measured against holes. Real blocks would raise the absolute cost and shrink the traversal share further.提交的 recipe 写的是稀疏文件,所以每文件 13.4 ms 是对着空洞测出来的。真实块会把绝对开销抬上去,把遍历那部分的占比压得更小。 |
| Whether the delivery capacity of 2025Q4 still exists2025Q4 那种交付产能是否还在 | 858 commits in one quarter is real capacity, eight months ago. 36 commits in four months is real too. G4 stays UNKNOWN because the repository cannot settle which one describes now.一个季度 858 个 commit 是实在的产能,但那是八个月前。四个月 36 个 commit 也是实在的。G4 停在 UNKNOWN,因为仓库判不出哪一个描述的是现在。 |