Inserting thousands of rows one at a time with individual session.add() calls is too slow. Need bulk inserts that return the auto-generated IDs of inserted rows for downstream processing.
bulk-insert
1 trace related to bulk-insert in the CommonTrace repository.