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

Severe performance issue

Discussion in 'FPS.Sample Game' started by carlself, Nov 30, 2018.

  1. carlself

    carlself

    Joined:
    Feb 5, 2016
    Posts:
    13
    Code in ClientGameWorld.HandleTime has severe performance issue. Line 420 tries to loop for (m_PredictedTime.tick - prevTick) times, which gets game stuck when server run for a long time before client joined. This can be easily tested.
     
  2. carlself

    carlself

    Joined:
    Feb 5, 2016
    Posts:
    13
    It seems that loop for min(m_PredictedTime.tick - prevTick, NetworkConfig.commandClientBufferSize) times is fine.
     
  3. Mogens_H

    Mogens_H

    Unity Technologies

    Joined:
    Mar 7, 2017
    Posts:
    20
    I think you are right - thanks. We will change that.