Repository navigation
Improve Multi-threaded landblock group ticking (non-physics) - #2383
Conversation
This splits up the previous Landblock Tick() work into two functions: TickMultiThreadedWork() TickSingleThreadedWork() Mainly, this allows multi-threading of the following work: Landblock.actionQueue.RunActions(); Landblock creatures Monster_Tick() Landblock Heartbeat Landblock Database Save The first two of which are the biggest CPU consumers from the previous Tick(), and, fortunately enough are pretty safe to multi-thread.
gmriggs
left a comment
There was a problem hiding this comment.
ce has been running this pr, no issues reported
|
ce has been running this PR without any issues for the past few days, however when we tried to add in #2415 today, the server crashed almost immediately on startup with this error: 2415 adds some new logic for players, but the calling profile of these functions should not be affected. this error was also purely for the monster movement paths, which 2415 does not change i'm wondering if it could have just been an odd coincidence that this happened when 2415 was added in... the way i see this error happening is right when the server is first starting up, if 2 monsters of the same type in separate landblocks both start running around the exact same time, this error could maybe occur |
This splits up the previous Landblock Tick() work into two functions:
TickMultiThreadedWork()
TickSingleThreadedWork()
Mainly, this allows multi-threading of the following work:
Landblock.actionQueue.RunActions();
Landblock creatures Monster_Tick()
Landblock Heartbeat
Landblock Database Save
The first two of which are the biggest CPU consumers from the previous Tick(), and, fortunately enough are pretty safe to multi-thread.