Names of places & projects should always be shown in place list and project list. Currently, place & project names are only shown if cached. Uncached names are shown as place/project id#s instead. The concern that originally drove this decision, namely, to avoid hammering the API with a lot of requests at once, is no longer an issue with these two advances in how we could be using the API more efficiently:
Both the place and project API calls that we currently use to populate each page of the display can accept multiple place & project IDs in a single call, up to however many can be fit into a single request.
The exact maximum should be determined by testing, as the API doc doesn't say, but 500 is a reasonable guess, as other calls that don't place huge demands on elasticsearch are capped at 500. This seems like that sort of use case.
Also, we recently revamped the API rate-limiting so that it can handle bursts of API requests via the aiolimiter package (see https://github.com/mjpieters/aiolimiter )
i.e. no longer a big deal if we do need > 500 at a time (or whatever we determine the upper limit is), as multiple requests can be sent back-to-back within a single command so long as there is still capacity left in the limiter and the user will hardly notice any delay, while not impacting significantly on other users unless a lot of users are making requests simultaneously
Names of places & projects should always be shown in
place list
andproject list
. Currently, place & project names are only shown if cached. Uncached names are shown as place/project id#s instead. The concern that originally drove this decision, namely, to avoid hammering the API with a lot of requests at once, is no longer an issue with these two advances in how we could be using the API more efficiently:aiolimiter
package (see https://github.com/mjpieters/aiolimiter )