Currently each entry in full snapshot of HMS is persisted one entry at a time. Instead it could be optimized by persisting the path entries in batches. DB operations are expensive, reducing the number of database operations and around trip time will help. This would decrease the time to persist the snapshot in to database significantly.
Size of the batch could be configurable.