- it looks synchronous. parallelizing the block processing should quickly speed it up
- looks like your orm is only doing single inserts. bulk inserts would be faster
*normal brain here but have used these techniques successfully. also I typically avoid orms in favor of sql for greater control over the db, but ymmv.