⚡ perf(vscode): 代码阅读预览发给页面的块带内容指纹:扩展端按卡片内容、在源码里占的地方连同子块的指纹算摘要,页面按指纹认出没变的块沿用原来的对象,不再逐块深比内容,5126 行的文档到了比对 10.6ms → 0.4ms

This commit is contained in:
cruldra committed 2026-10-13 16:39:59 +11:00
1 parent ad5f559e92
commit 266dc42bc5
13 files changed
+194 -26

No files matched your search

+5 -1
View File
@@ -80,9 +80,13 @@ interface PageCardBase {
export type PageCard = PageCardBase & ({ translation: PreviewText, items?: PropertyItem[], table?: PreviewTable, doc?: Markdown, rows?: PropertyRow[] } | { properties: PropertyRow[] })
/** 发给页面的一块(见 pageBlocks):卡片的内容,在源码里占的地方(相对的,见 BlockSpan),子块。内容没变、只是挪了位置的块,发出去一模一样。 */
/**
* 发给页面的一块(见 pageBlocks):卡片的内容,在源码里占的地方(相对的,见 BlockSpan),子块。内容没变、只是挪了位置的块,发出去一模一样。
* hash 是这些(连子块)的内容指纹:页面按它认出没变的块,不用逐块比内容。
*/
export type PageBlock = PageCard & {
span: BlockSpan
hash: string
children: PageBlock[]
}