I solved this issue, dividing rendering process to small peaces and executing them sequentially. For example, if I need to render 100 object, instead of rendering them in the loop, I just iterate and store functions to render each table to array. Then I call following method, placing array with actions to execute as argument:
databasy.ui.utils.executeSequentially = function (functions) {
if (functions.length == 0) {
return;
}
setTimeout(function() {
functions[0]();
functions.splice(0, 1);
databasy.ui.utils.executeSequentially(functions);
}, 0);
};
As you can see, first function is executed in setTimeout with argument 0. After it finishes, next function is scheduled. It allows touch other callbacks in the loop (including those one that needed for socket.io execution).