mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
Alpha 23 "lobby lag" release fix.
Caches the loaded mod versions, so that GetEngineInfo doesn't read the zip and json files everytime and returns about 1000 times faster. Adds two missing includes. The lobby froze multiple times every few seconds on updateGameList(). The gamesetup page was slowed down with every stanza sent and the load savegame selection page was slowed down per savegame selection, proportional to the number of installed zipped mods. Introduced by:d5807cd59fandeca956a513Differential Revision: https://code.wildfiregames.com/D1518 Reviewed By: wraitii Comments By: Imarok (in D1512, P121), leper (in the lobby) This was SVN commit r21823.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "ps/Util.h"
|
||||
#include "ps/VisualReplay.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRuntime.h"
|
||||
#include "scriptinterface/ScriptStats.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
#include "simulation2/helpers/SimulationCommand.h"
|
||||
@@ -179,6 +180,8 @@ void CReplayPlayer::Replay(bool serializationtest, int rejointestturn, bool oosl
|
||||
const int heapGrowthBytesGCTrigger = 20 * 1024 * 1024;
|
||||
g_ScriptRuntime = ScriptInterface::CreateRuntime(shared_ptr<ScriptRuntime>(), runtimeSize, heapGrowthBytesGCTrigger);
|
||||
|
||||
Mod::CacheEnabledModVersions(g_ScriptRuntime);
|
||||
|
||||
g_Game = new CGame(true, false);
|
||||
if (serializationtest)
|
||||
g_Game->GetSimulation2()->EnableSerializationTest();
|
||||
|
||||
Reference in New Issue
Block a user