I have a search method called recursively via the callback method. Presumably this will not crash the code by overflowing the stack. Is there some way to prove that the memory is not growing exponentially when this method is run from the callback?
var i=0; // global
var l=arrNames.length;
var cbfunc=function(err,record){
console.log(record.data);
if (++i<l){
client.search(arrNames[i], cbfunc);
}
}
// Presumably an async search method.
client.search(arrNames[i],cbfunc);