notion-sync
notion-sync copied to clipboard
Sync takes a long time
It shouldn't take that long to traverse the document and generate markdown. I'm not sure if we're doing network transactions under the hood or what.
We are also re-traversing the whole document any time it is updated. Maybe instead we need to be listening to every block and keep those values as cached? I feel like that's a lot of complexity
Notion has a built-in update feed, so I feel like diffed updates should be possible? I don't know if it's exposed in notion-py though.
It is, I would need to keep partial reconstructions of the tree stored in memory and then rebuild from a single node changing