NetworkTransform Performance Issue in Large Scenes
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- csharp, unity
調査の方向性
まず、約500個のNetworkTransformコンポーネントを含むUnity 2021.3.12f1プロジェクトで問題を再現し、ビルドでprofilerを調査します。transform同期のコストを、同期されたMatrix4x4ネットワーク変数のコストと比較し、その後、NetworkTransformの更新パスをバッチ処理するかJob Systemに移行できるかを判断します。完了の基準は、定常状態のオーバーヘッドが大幅に低下することです。
索引モデルが issue の本文から書いたものです。
説明
Description
The Network Transform component is significantly more expensive than necessary. I suspect this is due to its lack of batching or usage of the Job System. It might be possible to move most, if not all, the logic into a burst compiled job.
Reproduce Steps
- Build a new project with netcode
- Add ~500 network transforms
- Observe profiler in build

Expected Outcome
Executing the syncing of the transforms should incur a time cost on par with simply using a synced network variable of a matrix4x4
Actual Outcome
Considerable performance losses, possibly due to Update overhead
Details
Unity Version 2021.3.12f1
Netcode Version 1.2.0
Transport Version 1.3.0
Additional Thoughts
Im working on a fairly large simulation project, and am using NGO for sharing said data. As such, I have between 500 and 1000 network transforms for syncing simulation data between clients. The profiling data above is after the simulation settles, so the only network messages been sent are heartbeat.
After doing my own deep dive into the network transform, I noticed that the work it was doing wasn't batched. It might be possible to use the job system to deal with these transforms, thus allowing a much larger cap on the amount of synced network objects in a scene.
Sadly, until the performance of the network transform is improved, I'm going to have to attempt to implement my own version of the network transform.
- 主要言語
- C#
- スター
- 2.3k
- フォーク
- 461
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 20
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Unity-Technologies/com.unity.netcode.gameobjects のほかの issue
-
stat:awaiting-response stat:imported type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
Unity-Technologies/com.unity.netcode.gameobjects#4159 · コメント 3 件 ·
-
stat:reply-needed type:support
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
Unity-Technologies/com.unity.netcode.gameobjects#4095 · コメント 10 件 ·
-
stat:awaiting-triage stat:Investigating type:bug
Unity-Technologies/com.unity.netcode.gameobjects#3912 · コメント 5 件 · 担当者 1 名 ·
-
Tracking type:feature-2.x
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Unity-Technologies/com.unity.netcode.gameobjects#3870 · コメント 5 件 ·
-
Tracking type:feature
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
Unity-Technologies/com.unity.netcode.gameobjects#3830 · コメント 7 件 ·
Unity-Technologies/com.unity.netcode.gameobjects の issue をすべて見る
似ている issue
-
core dependencies
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
-
bug frontend good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Down / Waiting for removal
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100