Opened 5 years ago

Last modified 5 years ago

#30722 closed Cleanup/optimization

Rate-limit autocomplete widgets Ajax requests — at Version 1

Reported by: Federico Jaramillo Martínez Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Federico Jaramillo Martínez)

The current implementation of the Ajax autocomplete widget using Select2 in Django triggers a request for every key-press. This creates unnecessary load on servers.

This patch rate-limit the requests by adding a delay using the ajax.delay option provided by Select2.

https://github.com/django/django/pull/11695

Change History (3)

by Federico Jaramillo Martínez, 5 years ago

Attachment: no-rate-limit.mp4 added

Multiple consecutive request

by Federico Jaramillo Martínez, 5 years ago

Attachment: with-rate-limit.mp4 added

Requests with a delay until user stops typing

comment:1 by Federico Jaramillo Martínez, 5 years ago

Description: modified (diff)
Has patch: set
Type: UncategorizedCleanup/optimization

Include link to PR

Note: See TracTickets for help on using tickets.
Back to Top