Increase the frequency of calling setImmediate in the geocoderDataIterator function

This commit is contained in:
Andrew Pendleton
2016-04-04 10:49:34 -04:00
parent 11b6381c4f
commit b37655577f

View File

@@ -616,7 +616,7 @@ MBTiles.prototype.putGeocoderData = function(type, shard, data, callback) {
};
var stackCounter = 0;
var stackMax = 10;
var stackMax = 3;
// Implements carmen#geocoderDataIterator method.
MBTiles.prototype.geocoderDataIterator = function(type) {
@@ -628,7 +628,7 @@ MBTiles.prototype.geocoderDataIterator = function(type) {
var doneSentinel = {};
var _this = this;
// every tenth callback call (globally) do it via setImmediate
// every nth callback call (globally) do it via setImmediate
// to avoid callback loops that blow the callstack
var checkStack = function(cb, arg) {
if (stackCounter >= stackMax) {