Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Network transfert array lag?

Discussion in 'Multiplayer' started by matt0709, May 7, 2015.

  1. matt0709

    matt0709

    Joined:
    Jan 11, 2014
    Posts:
    4
    Hi everyone, I'm currently working on a video chat system for my internship.

    But I've a problem, with the web cam texture, in fact I send the webcam informations through RPC.
    The variable is an byte[] and it works but the problem is the server (which receives the information of client webcam) is too slow to update the renderer... The byte[].lenght of the data sent is between 300 000 - 600 000.. I think that's why this is so slow moreover if the conversation is too long, the renderer freezes and the executable crashes.
    So if someone now how to reduce the lag, I'll be gratefull !

    I hope you'll understand me... If you need a part of my code, just ask !

    Have a good day!!
    matt
     
  2. psyydack

    psyydack

    Joined:
    Aug 30, 2013
    Posts:
    93
    Hi, well, I think you can see how much time your client spend running through 300k ~ 600k in array. Like that : http://stackoverflow.com/questions/454916/performance-of-arrays-vs-lists . Maybe you need to see how is your buffer size, maybe your GC is not working correctly.

    If you can do a benchmark and post your results here, like: time to send all info, size of your buffer, time to render, is a good start to help more. =)
     
  3. matt0709

    matt0709

    Joined:
    Jan 11, 2014
    Posts:
    4
    I just tested on others pc and the problem is the same so it's not an hardware problem :(