You can use a debounce
function so that the function is only called after for a period of time p
Underscore js offers a nice debounce function which you can use as below:
var observer = new MutationObserver(_.debounce(function() {
//make ajax calls and stuff
}, 1000));//the ajax function wont be called until 1000 ms have passed
observer.observe(document, {childList:true});
So this will prevent your ajax call from being made until 1 second has elapsed since the last mutation and it will not fire if there was not a 1 sec since the previous mutation.
Here's perhaps the simplest implementation from an old version of underscore and a perf test comparing different implementations