Adding to Resources to large Resource collection takes a long time
Ian-BD opened this issue · 0 comments
So a client of mine noted it was taking a long time to add resources to a collection they've been working on, after taking a look I spotted that when adding a resource, the API seems to PUT the state of the Resourse collection, which means as a collection grows it progressively gets slower and slower.
Expected Behavior
I would expect that when adding a resource the API simply adds the relevant resource to the collection.
Current Behavior
In our case a very large collection of over 3000 resources are all present in the PUT request
Possible Solution
I think the simplest solution would be to have API calls to remove and add things to the collection.
Steps to Reproduce
- Create a resource collection
- Add Resources to the collection
- Note that every time one more is added the request get's larger and takes longer.
Context (Environment)
Our client has been using a large resouce collection and over time it's becoming harder and harder to manage as it takes longer and longer to add resources, the actualy collection itself loads fine on the front-end as the results are paginated.