do some heavy work outside of the database transaction