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

Too many requests on image upload #247

Open
2 tasks
rathorevaibhav opened this issue Sep 17, 2021 · 0 comments
Open
2 tasks

Too many requests on image upload #247

rathorevaibhav opened this issue Sep 17, 2021 · 0 comments
Assignees

Comments

@rathorevaibhav
Copy link
Contributor

Describe the task
This is a screenshot of the Django signals that get trigger when we upload an image for a question. This plio has three questions configured (hence three items and three questions).

The format is instance type updated followed by instance ID.
image

Notice that the Django save_post signal triggers for all items, all questions, video and then for plio.
It seems we're making way too many calls than needed to support auto-save functionality. The problems with the above implementation would be:

  1. A lot of requests at the backend may impact the server performance for other users.
  2. The responses to these requests includes lots of computation (like plio joins with video, plio joins with items, every item joins with question, question joins with image)
  3. In case of more questions for a plio, this value multiplies.

Expected behavior

  • Plan how we can reduce the number of requests
  • Audit other areas where this is happening
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants