Update Contrib to use bulk CRUD operations for Django database models
Environment
- Nautobot version:
- nautobot-ssot version:
The contrib code currently performs CRUD operations one at a time. This can take a very long time in instances where the operations get into the thousands. Part of the reason
Proposed Functionality
Take advantage of Django's bulk CRUD methods (bulk_update(), bulk_create(), etc.) in SSoT Contrib.
Use Case
Use case includes any SSoT job syncing data into Nautobot in order to improve time required to create many objects.
This is a good performance improvement idea. Bulk operations have different ways of validating / verifying during clean up - let's ensure this is not missed!
Have been discussing with @jdrew82 a bit on this and we both agree the changes would need stay within the SSoT app and not impact the diffsync library.
This is something I think would be useful but would definitely have to be configurable as I wouldn't like for it to be the default behaviour.
This is something I think would be useful but would definitely have to be configurable as I wouldn't like for it to be the default behaviour.
Absolutely should NOT be the default behavior to use bulk. That should only be used if designated by the dev.
See #555 and #34