-
Notifications
You must be signed in to change notification settings - Fork 109
Parallelized client / server think on listen server? #441
Comments
Engine has many thread-unsafe places that can be reached from client/server exports. And two threads will not give much performance improvenent. |
Another way is to Think() multiple entities at once. However a thread-safe hlsdk/server is required. |
Is server really is a bottleneck? I do not see any performance difference between listenserver and client-only in HL. Is there any difference in CS? Maybe profile it first? If bots loads server so much, maybe simplier to move bots to other thread? |
Yep. Those zbots are so laggy. There is a significant fps drop after joining some zbots. some APIs must be redesigned:
|
There is AngleVecrorsPrivate whuch do not modify global state. And it maybe implemented in server. It does not require modify engine. |
Moving the whole server frame to separate thread is possible and maybe easier than you think. Unkle Mike also did this, but don't got any improvement and never published it. There was an engine feature with different FPS for server and client in newer original engine builds, but removed later. You can use this as base for timers. But anyway, keep in mind memory access to avoid race condition. Probably you may need to rewrite local networking to make it thread safe. |
How about calling Host_ServerFrame and Host_ClientFrame at once on different threads to achieve better performance?
The text was updated successfully, but these errors were encountered: