You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/02/06 20:27:05 UTC

[GitHub] Antonio-Maranhao opened a new pull request #1053: Throttle fetch requests triggered by key press events

Antonio-Maranhao opened a new pull request #1053: Throttle fetch requests triggered by key press events
URL: https://github.com/apache/couchdb-fauxton/pull/1053
 
 
   ## Overview
   
   The search fields at the top fire one fetch request for each key pressed. Besides being a waste of resources, a user could overload the server by simply typing fast enough on these fields. 
   
   This PR changes this behaviour so a fetch is only triggered 400ms after the last character was typed in.
   
   ## Testing recommendations
   
    - Open the network tab in the browser's devtools
    - In the database list page, type a few characters in the Database Name field at the top. 
    - If you typed fast enough (i.e. time between each key press is < 400ms) you should see only one request in the network tab
    - Repeat the steps above for the Document search in the All Documents page
   
   
   ## Checklist
   
   - [x] Code is written and works correctly;
   - [ ] Changes are covered by tests;
   - [ ] Documentation reflects the changes;
   - [ ] Update [rebar.config.script](https://github.com/apache/couchdb/blob/master/rebar.config.script) with the correct tag once a new Fauxton release is made
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services