AtlasOfLivingAustralia / profile-hub

Profiles front end application
http://www.ausflora.org.au/
0 stars 3 forks source link

API response take a long time #817

Open temi opened 3 months ago

temi commented 3 months ago

APIs such as the one to fetch a profile can take a long time (more than 0.5 seconds). Downloading content for a batch of species profiles adds up. Investigate what is causing this to happen. One option is to add a flag to fetch opus config only when it is needed.

adam-collins commented 2 months ago

Performance varies depending on the opusID. The worst performer on dev is foa, where the slowest request among the first 5 profiles retrieved was 5.4 seconds. Executing 10 concurrent requests to dev for foa reduces the average time to 767 milliseconds for the 19898 profiles with a guid, or 4.24 hours for all foa profiles with a guid.

For a comparison, the /export service will return all the required information for foa in a minute or two.

temi commented 1 month ago

@adam-collins a faster implementation of API is now on profiles-dev.ala.org.au. You have to include two query parameters - onlyContent=true&fullClassification=false

adam-collins commented 1 month ago

Tested and it is much faster on dev. 4.5 hrs to 0.3 hrs for foa.