Reply To: SyphonServerDirectory issue

Home Forums Syphon Syphon Development – Developer SyphonServerDirectory issue Reply To: SyphonServerDirectory issue

#5155
vade
Keymaster

This is *probably* a notification delay in NSDisttributedNotification. Basically clients and servers post notifications to the operating system, which in turn notifies the app that a server, or a client has appeared and requests a list of available resources.

I dont know what the normal delay is in the client finding a server. That is a good question. You need *immediate* response?

You could try making a call to [SyphonServerDirectory sharedDirectory] on level load, and keep a reference to it (so the singleton object is already initted in your app), and only call [serversArray count] every frame. You might be seeing the startup cost of initially making the first and only instance of the singleton. Try making the singleton prior to your first frame being called?

That might help shave some time off. that said, NSDistributedNotification is not amazingly speedy, and object creation is *very* optimized, so id be surprised if creating the singleton SharedDirectory prior to level load made a giant difference.