- removed the sequential processing of JSON objects because the benefit is too small.
After testing with a savegame on ZDCMP2 which is probably the largest map in existence, timing both methods resulted in a speed difference of less than 40 ms (70 vs 110 ms for reading all sectory, linedefs, sidedefs and objects). This compares to an overall restoration time, including reloading the level, precaching all textures and setting everything up, of approx. 1.2 s, meaning an increase of 3% of the entire reloading time. That's simply not worth all the negative side effects that may happen with a method that highly depends on proper code construction. On the other hand, using random access means that a savegame version change is only needed now when the semantics of a field change, but not if some get added or deleted. - do not I_Error out in the serializer unless caused by a programming error. It is better to let the serializer finish, collect all the errors and I_Error out when the game is known to be in a stable enough state to allow unwinding.
This commit is contained in:
parent
5a3f1dcdb6
commit
86e9282193
11 changed files with 346 additions and 254 deletions
|
|
@ -394,8 +394,12 @@ void DThinker::Tick ()
|
|||
|
||||
size_t DThinker::PropagateMark()
|
||||
{
|
||||
assert(NextThinker != NULL && !(NextThinker->ObjectFlags & OF_EuthanizeMe));
|
||||
assert(PrevThinker != NULL && !(PrevThinker->ObjectFlags & OF_EuthanizeMe));
|
||||
// Do not choke on partially initialized objects (as happens when loading a savegame fails)
|
||||
if (NextThinker != nullptr || PrevThinker != nullptr)
|
||||
{
|
||||
assert(NextThinker != nullptr && !(NextThinker->ObjectFlags & OF_EuthanizeMe));
|
||||
assert(PrevThinker != nullptr && !(PrevThinker->ObjectFlags & OF_EuthanizeMe));
|
||||
}
|
||||
GC::Mark(NextThinker);
|
||||
GC::Mark(PrevThinker);
|
||||
return Super::PropagateMark();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue