Skip to content

Use bulk write operation to insert Event/Datum Page into database

Latest
Compare
Choose a tag to compare
@padraic-shafer padraic-shafer released this 23 Jan 15:09
e1493d8

suitcase-mongo now uses pymongo's insert_many() function to simultaneously send all Events from an Event Page to the mongo database, rather than the previous behavior of calling insert_one() for each Event inside a for-loop. The same change was applied to inserting a Datum Page.

This should reduce the time needed to store data when a Bluesky run has many thousands of events. The effect should be even more pronounced in deployments where network latency is high.