Multiplayer game laggy when packaged not laggy on editor.

So that, When I play on editor it goes really well, but when I play on packaged game with friends or alone by connecting to myself it lags like hell… any ideas?
what things do I need to take in mind for having something smooth?