Adjusted entity persistence to run in batches of 100 instead of all at once or one at a time.