I have a socket connection which implemented with socket.io which send 2 type of events.
if browser receives event A, angularjs runs a function and then inserts a row to table A which takes about 100 ms, and if browser receives event B angularjs runs a function and then inserts a row to table B which takes about 150 ms.
now imaging server is transmitting an event per 10 ms, it causes thread blocking and browser freezes so i can not do any thing else.
what is the best practice to solve these kind of problems.