Closed manuelconcini closed 2 years ago
In my project I need to make a lot of queries (more than 2000) in a short time. Following code works only for a little amount of queries (max 78).
db.transaction(function(tx) { console.log("Execute " + queries_and_params_arr.length + " queries!"); for (var i = 0; i < queries_and_params_arr.length; i++) { count++; var query = queries_and_params_arr[i].query; var params = queries_and_params_arr[i].params; (function(arr_obj) { tx.executeSql(query, params, function(tx, resultSet) { checkCallback(true, arr_obj); }, function() { checkCallback(false, arr_obj); }); })(queries_and_params_arr[i]); } });
When I try executing more than 1000 queries, Google Chrome console stop working and all the web app stops.
In my project I need to make a lot of queries (more than 2000) in a short time. Following code works only for a little amount of queries (max 78).
db.transaction(function(tx) { console.log("Execute " + queries_and_params_arr.length + " queries!"); for (var i = 0; i < queries_and_params_arr.length; i++) { count++; var query = queries_and_params_arr[i].query; var params = queries_and_params_arr[i].params; (function(arr_obj) { tx.executeSql(query, params, function(tx, resultSet) { checkCallback(true, arr_obj); }, function() { checkCallback(false, arr_obj); }); })(queries_and_params_arr[i]); } });
When I try executing more than 1000 queries, Google Chrome console stop working and all the web app stops.