From 210f552ac56979430f1349006c1945b29883a2bc Mon Sep 17 00:00:00 2001 From: Ovah Date: Tue, 28 Jul 2020 21:52:03 +0200 Subject: Core/World: added startup log outputs for query cache initialization for detailed information. * the console will now throw a log when the feature is disabled * additionally the console will now print how long it took to initialize --- src/server/game/Globals/ObjectMgr.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 8be1053099f..52eca422e6c 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -10272,9 +10272,14 @@ void ObjectMgr::LoadCreatureQuestItems() void ObjectMgr::InitializeQueriesData(QueryDataGroup mask) { + uint32 oldMSTime = getMSTime(); + // cache disabled if (!sWorld->getBoolConfig(CONFIG_CACHE_DATA_QUERIES)) + { + TC_LOG_INFO("server.loading", ">> Query data caching is disabled. Skipped initialization."); return; + } // Initialize Query data for creatures if (mask & QUERY_DATA_CREATURES) @@ -10300,6 +10305,8 @@ void ObjectMgr::InitializeQueriesData(QueryDataGroup mask) if (mask & QUERY_DATA_POIS) for (auto& poiWrapperPair : _questPOIStore) poiWrapperPair.second.InitializeQueryData(); + + TC_LOG_INFO("server.loading", ">> Initialized query cache data in %u ms", GetMSTimeDiffToNow(oldMSTime)); } void QuestPOIWrapper::InitializeQueryData() -- cgit v1.2.3