{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/2f5badd2168546dba687e2844ebc2d46\" frameborder=\"0\" width=\"1920\" height=\"1440\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":1440,"width":1920,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":1440,"thumbnail_width":1920,"thumbnail_url":"https://cdn.loom.com/sessions/thumbnails/2f5badd2168546dba687e2844ebc2d46-75880df0e054a4e8.gif","duration":106.965,"title":"Building a Relation Index for Live Preview","description":"This Loom explains the approach to improve relation lookups by splitting the work into three pull requests: creating a cache relation index, implementing the live preview, and adding support for reading view. The key motivation is that Roam relation queries are asynchronous with a cache, while Obsidian reads relations synchronously, making repeated JSON relation reads too expensive across many wiki links. It discusses a Discourse Context Panel workaround that runs once per file open, but notes that pages with many notes can lead to O(N x M) behavior. To address this, the team builds a relation index mapping relations like A to B and C to A, so lookup time becomes about 01 and JSON parsing happens only once."}