IR page times out
@becky-gilbert is already working on this.
Since Apr 2, 2025.
- Dominant language
- Python
- Stars
- 12
- Forks
- 21
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 5
Description
## Summary
The Individual Responses page for (at least) one particular study is still timing out.
## How to reproduce
Try to load the Individual Responses page for Study ~~2803~~ 2 in production.
This is tricky to test in local/staging environments because we don't have responses with as many videos, and there isn't an easy way to generate responses with lots of videos locally (because we don't have a local lambda trigger equivalent to add new videos to our local database). In staging, the largest number of videos for a single response is in study 374 (61 videos), and study 341 has the largest number of total associated videos (694).
## Description
We considered the N scaling problem with regard to the number of responses when making changes to the Individual Responses page, but there is also the problem of unknown and potentially large numbers of videos per response. Study 2803 does not have an unusually large number of responses (around 335 with approved consent), but it has a larger number of associated videos (9420) than the other studies that we've been working with for testing.
There are a few studies in production with even greater numbers of total videos (study 2: 19269) and videos associated with a single response (study 654: 253).
## Solutions
- Fix video prefetch query: #1557
- Fix the video element loop in the template (either find a way to make this more efficient, or remove these hidden elements and replace with AJAX requests)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.