Facepunch / sbox-issues

175 stars 12 forks source link

Clients lag a LOT when theres a lot of networked GameObjects with Rigidbodies #5954

Open Xenthio opened 3 months ago

Xenthio commented 3 months ago

Describe the bug

When you create a lot of rigidbody GameObjects (like 600) that are networked, all clients (not the host) connect to the game begin to lag a LOT (try load a map like thieves.community_bowling where all the props are networkspawned)

To Reproduce

  1. Create a scene
  2. Create a bunch of Networked Props/Rigidbodies.
  3. Connect a client

Expected behavior

The game shouldn't lag, I don't see any reason why it should lag more than when we had the same amount of objects networked in the old entity system.

Media/Files

Profile: https://cdn.discordapp.com/attachments/1264641510918455451/1266582600139673702/2024-07-27_12-15-14_sbox.7z Profiler screenshot: image

Additional context

No response

aylaylay commented 3 months ago

I have a feeling networked rigidbodies are generating way more hit contacts than they should be