Hello guys,
I'm totally going overboard with MB Blocks with my projects, but I'm having a huge issue when the context of editing is set to "side".
Whenever the user makes the most subtle change an Ajax call is fired to the server to render the block again. Now, if I have either a text field or a colour field or a range/slider field, this can end up happening so many times in a matter of a fraction of a second that it's likely to overload the server, especially if multiple people are using the block editor at the same time.
First of all, a new Ajax call should not get fired until the previous one completed, and also if the user makes further changes only the final call should be made instead of one-per-change.
Adding a simple delay to the triggering of the call would help a lot. I.e. if I'm typing in a text field, I'll likely need a few seconds to complete my sentence. So if the trigger waits 1 second we'd already avoid tons of calls.
I could not find in the docs a way to add a delay to the Ajax call. Is there maybe a filter I could use?
Also, _for text fields_ it would help if the call would be fired after I'm done editing, i.e. when I remove the focus. And for _colour fields_, it should fire when I click on "select color" rather than every time a change is made.
Hope this all makes sense!
Thanks,
Mauro.