-
Notifications
You must be signed in to change notification settings - Fork 0
library add/update がライブラリの全内容を2回ディスクから読む #85
Copy link
Copy link
Open
Labels
Kind/EnhancementImprove existing functionalityImprove existing functionalityModule: LibraryThe library registration domainThe library registration domainPerformanceRelated to runtime or registration speedRelated to runtime or registration speedPriority/LowThe priority is lowThe priority is low
Description
Activity
Metadata
Metadata
Assignees
Labels
Kind/EnhancementImprove existing functionalityImprove existing functionalityModule: LibraryThe library registration domainThe library registration domainPerformanceRelated to runtime or registration speedRelated to runtime or registration speedPriority/LowThe priority is lowThe priority is low
症状
library/registry.rsのregisterは、identifiers::enumerateで全ソースファイルを読み込んだ直後、hash::aggregateが同じファイル群をディスクからもう一度全読みする。数千ファイル・数十 MB 級のライブラリを
library add/updateすると、全内容のディスク読み込みが丸ごと2周走り、登録時間の読み取り分がそのまま倍になる (特にコールドキャッシュ環境で顕著)。対処案
fs::source::walk_sourcesを1回にまとめ、同じ走査の中で各ファイルの内容を識別子抽出とハッシュ計算 (逐次更新) の両方へ渡す。🤖 Generated with Claude Code