RolnickLab / ami-platform

GNU General Public License v3.0
8 stars 2 forks source link

Fix timeout on session detail pages with many species #362

Closed mihow closed 4 months ago

mihow commented 4 months ago

It turns out a single query that uses annotations to count the number of taxa and occurrences for a night is much much slower than using separate queries.

This also was a chance to standardize how the confidence_threshold parameter is used. Most views should now look for this query parameter in the current request when counting or displaying occurrences or detected taxa. It falls back to the DEFAULT_CONFIDENCE_THRESHOLD in the Django settings, which is also an env var.

netlify[bot] commented 4 months ago

Deploy Preview for ami-web canceled.

Name Link
Latest commit c3154d4ad7d5fa490dffa24040d3cb5292cbfc1e
Latest deploy log https://app.netlify.com/sites/ami-web/deploys/65de6c67e418d000086e4c6f
netlify[bot] commented 4 months ago

Deploy Preview for ami-storybook canceled.

Name Link
Latest commit c3154d4ad7d5fa490dffa24040d3cb5292cbfc1e
Latest deploy log https://app.netlify.com/sites/ami-storybook/deploys/65de6c67b61e570008cd2ce6
mihow commented 4 months ago

@kpmcfarland This should fix the issue you are facing with May 31, 2022! https://app.preview.insectai.org/projects/18/sessions/2575