I'm new to GCD principles and GCDAsyncSocket, but I'm using it in my project. I initialize the GCD socket in the AppDelegate with:
self.socket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_main_queue()];
Now, everything runs fine, sending and receiving works fine. But, if the socket receives a lot of data very fast (like a 1000 or so messages from a 'for loop' from the server), the app's UI freezes till it has received everything (Although there are no errors in the received messages).
So what do I need to change to not let the UI freeze? Is it because it is using "dispatch_get_main_queue()", do I need to use another queue? if so, how should I go about it? Or do I use threading or something like that?