Opened 6 years ago
Last modified 6 years ago
#30722 closed Cleanup/optimization
Rate-limit autocomplete widgets Ajax requests — at Initial Version
| 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
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.
Change History (2)
by , 6 years ago
| Attachment: | no-rate-limit.mp4 added |
|---|
by , 6 years ago
| Attachment: | with-rate-limit.mp4 added |
|---|
Requests with a delay until user stops typing
Note:
See TracTickets
for help on using tickets.
Multiple consecutive request