invernyx / smartcars-3-bugs

The bug tracker for the smartCARS 3 application
3 stars 0 forks source link

[BUG] - new request for each keystroke when in quick succession #58

Closed jordanhavard closed 1 year ago

jordanhavard commented 1 year ago

Describe the bug There is no delay between user input and firing a request off which could send an overload to servers

To Reproduce Steps to reproduce the behavior:

  1. Login to va
  2. navigate to bookings
  3. click new flight/bid
  4. open console
  5. view requests getting fired on each key stroke

Expected behavior To help reduce unecessary requests from being fired off, debounce the request for 200ms and once no input it detected then fire the request

video https://www.loom.com/share/d9233711d1764e0796c375205e856f4d

System Information (please complete the following information):

Additional context This also applies to the sliders, if you drag those, hundreds of requests can be submitted in quick succession. It also degrades the performance of the client

GenericNerd commented 1 year ago

This does not send a request to the VA, but to a local API endpoint, which has stored the flights internally. The API requests you see are for filtering, which do not send to the server.