Open hburgund opened 7 years ago
significant optimization work done using prefetch_related
and select_related
that speeds up call in some cases by order of magnitude: 1ecb0f253119a2c34761212355bd82414b04fcb9
caching is likely still a good idea, but this is a major improvement.
The
assets/
endpoint works fine for small number of assets, but when there are thousands of assets, it starts to take a long time to return the result which in turn causes major slow-downs on the client-side.Ideally, all calls to
assets/
would have an optional parameter to take the cached response or not and the cached response would automatically be updated server-side every time a new asset is added.It is crucial that clients are able to grab the most recent data because when a client adds a new asset, they will want it to show up on the map, for example, right away.
It is likely that the
assets/
code can be optimized to improve efficiency, but this may not be enough to really fix the current problem, hence the caching research.Resources