   Server too slow
  I was trying to develop a multiplayer game and was working on the server and client.Both are working properly but are very slow. This is what actually happens.Consider, two clients connected to one server.When the client changes something in his machine(moves a player), the co-ordinates are instantly sent to the server. From server to remote machine, a delay occurs when the server window is not in focus. Well the focus problem occurs because I am debugging them on the same pc.Any explainations for this??Will it sort out when server runs on different pc??   
  You might be having some thread that is running at 100% of the CPU, which causes background apps to be scheduled less often.So, first thing to do: look in the task manager for a thread that uses lots of CPU, and figure out why it's spinning when it should be waiting.If your main thread runs at 100% CPU because it does the maximum frame rate rendering thing, you'll have to insert a Sleep() call to yield the CPU after you Present() your frame, to make the background threads run reasonably well.