Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High request times for retrieval of statistics & data on forms with a large number of contributors and submissions #2163

Closed
DavisRayM opened this issue Oct 28, 2021 · 4 comments · Fixed by #2167

Comments

@DavisRayM
Copy link
Contributor

DavisRayM commented Oct 28, 2021

Current situation

The statistics endpoint /api/v1/stats/submissions alongside the data endpoint /api/v1/data (when used with start and limit query params) and media count endpoints currently take a lot of time(Around 1 - 3 minute depending on server load) to compute the statistics of a given form... This leads to some unpleasant user interactions.

We should look into a way to decrease the amount of processing/query time we take for such requests in order to speed up the request times as the current wait time is too long IMO

image

Suggested approaches

  • Calculate submission stats as submissions are made(Async task post submission perhaps?) & save the statistics to cache
@DavisRayM
Copy link
Contributor Author

DavisRayM commented Oct 28, 2021

Screenshot of the queries currently run on the stats endpoint:

Screenshot from 2021-10-28 10-53-22

Results: 20.54 ms (16 queries including 12 similar and 10 duplicates ); Form had around 4k submissions

@alepietrobon
Copy link

keep me posted on this, guys. Clients are onto it. Thanks!
image

@alepietrobon
Copy link

Dunno if i should reopen this or create a new ticket, but this problem is not solved yet.
These stats are still taking many minutes to load
image
image

@DavisRayM
Copy link
Contributor Author

Closing this issue; Kindly re-open if review fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants