I need to reindex and rebuild the tree on each update. I also need to notify the front-end that things have changed.
I do this at runtime, rather than at scan time, to cut down on storage space required to store the library.