The Notion importer (#275) creates documents one at a time. Each is a separate insert, plus its meta, plus a term assignment, so a large database means a lot of round-trips.
Proposed solution: batch the writes. Insert documents in chunks, prime caches once, and write meta and trait terms in bulk instead of per document.
The Notion importer (#275) creates documents one at a time. Each is a separate insert, plus its meta, plus a term assignment, so a large database means a lot of round-trips.
Proposed solution: batch the writes. Insert documents in chunks, prime caches once, and write meta and trait terms in bulk instead of per document.