If you add or delete multiple samples at once (but not the entire sample set), it will fire an UI update for each sample drastically slowing down the UI responsiveness. More...
If you add or delete multiple samples at once (but not the entire sample set), it will fire an UI update for each sample drastically slowing down the UI responsiveness.
In this case, just create a ScopedUpdateDelayer object and it will cancel all UI updates until it goes out of scope (and in this case, it will fire a update regardless if it's necessary or not.