-
Notifications
You must be signed in to change notification settings - Fork 0
tags.json がバンドル1回につき二重に読み込まれる (auto_migrate と Inventory::load) #84
Copy link
Copy link
Open
Labels
Kind/EnhancementImprove existing functionalityImprove existing functionalityModule: BundleThe tree-shaking pipelineThe tree-shaking pipelineModule: LibraryThe library registration domainThe library registration domainPerformanceRelated to runtime or registration speedRelated to runtime or registration speedPriority/MediumThe priority is mediumThe priority is medium
Description
Activity
Metadata
Metadata
Assignees
Labels
Kind/EnhancementImprove existing functionalityImprove existing functionalityModule: BundleThe tree-shaking pipelineThe tree-shaking pipelineModule: LibraryThe library registration domainThe library registration domainPerformanceRelated to runtime or registration speedRelated to runtime or registration speedPriority/MediumThe priority is mediumThe priority is medium
症状
commands/bundle.rsのrunは、起動直後にregistry::auto_migrateが全登録ライブラリのtags.jsonを読み・パースし (スキーマ確認のため)、その直後にInventory::loadが同じtags.json群をもう一度読み・パースする。識別子を大量に含む (数百 KB 級の)
tags.jsonを持つライブラリが複数登録されていると、バンドル 1 回ごとに JSON の読み込みとパースが丸ごと二重になる。対処案
auto_migrateが読み込んだTagsをInventory::loadへそのまま渡すか、スキーマ移行をInventory::loadの内部へ統合し、ファイルごとの読み込みを 1 回にまとめる。🤖 Generated with Claude Code