Open Deery50 opened 7 years ago
Bro i have the same problem.. U solved it??????
@Xakinlee @Deery50 , guys, did you solve the problem? I also have the same issue. By measuring socket.emit processing time (I did 3 tests) found that:
render elapsedTime: 245100 ns (Look at this, this is a first iteration in for loop in one render cycle, very weird) elapsedTime: 5600 ns (this is the second iteration in for loop in the same render cycle) elapsedTime: 600 ns elapsedTime: 700 ns elapsedTime: 300 ns elapsedTime: 400 ns elapsedTime: 300 ns
processing time in third, fourth, n-th iteration in the for loop look much better than first/second for some reason. This is weird situation that I found, and have no answer for this behaviour. Also it will be good if you guys have somne answers or some advices. Best regards!
Same issue :(
I'm using this library with LibGDX and I have all of my socket related activity in a different thread from the LibGDX graphics thread. It runs perfectly fine for all received requests but every time I try to emit a new request from the client, every single thread I have (including the graphics thread) freezes for 2 milliseconds (I calculated). To reiterate, this is when I call "socket.emit(id, data);" from the client. For good measure I've got the code of Client.java below which contains everything I have that deals with this socket library. The issue occurs on line 133 with "socket.emit("move", data);"
EDIT: After Testing around more with this. If the client receives a request very often, the same effect of every thread slowing down occurs.
public class Client implements Runnable {
} `