Optimize multiple changes on the same delay#17
Optimize multiple changes on the same delay#17jpamador wants to merge 1 commit intoElMassimo:mainfrom
Conversation
When there are multiple changes within the delay window right now they are just queue instead of doing one per window.
|
Hi there! Would you describe your use case? |
|
Hi! I have an application that on certain occasions does several changes in a row to the backend. We are using your plugin (thanks btw!) with a delay of 2 seconds to give time for the backend to cool down, but what I have seen is that let's say I do 3 changes to the backend on those 2 seconds, I will then see 3 reloads, this change is to "aggregate" those changes in the delay window and just do one |
Modifying files? Can you elaborate further? |
|
I'm just developing an application with frontend and backend using JS, for development purposes I have a big window on the auto-refresh so that it give me time to do changes to different files in the backend before it refreshes so that its a complete change (that may involve changing 3 files). But as I mentioned before, with the current set up, when the window is up, I get 3 refreshed back to back instead of 1. |
|
Essentially this is debouncing (e.g. https://browsersync.io/docs/options#option-reloadDebounce). What he’s saying (if I’m not mistaken) is that even though there’s currently a |
|
@ElMassimo @jpamador I think that this PR is something that also might help and does what we all need in a very controlled and simple way? Or maybe I'm misunderstanding something @jpamador? |
When there are multiple changes within the delay window right now they are just queue instead of doing one per window.