From 71ba68e3a3820094f6dbd580955963e7b0c6c14d Mon Sep 17 00:00:00 2001 From: Yves Date: Sun, 21 Dec 2014 01:44:00 +0000 Subject: [PATCH] Fix performance problem with unnecessary global message subscription On my ESR31 branch, I've made two measurements with different replays (both around 15000 turns). In the first, I got around 3% performance improvement and in the second about 7.5%. It mainly depends on how often aura changes related to the female citizen aura happen. This was SVN commit r16055. --- source/simulation2/components/CCmpVision.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/simulation2/components/CCmpVision.cpp b/source/simulation2/components/CCmpVision.cpp index d03a00a127..a44d3c7d24 100644 --- a/source/simulation2/components/CCmpVision.cpp +++ b/source/simulation2/components/CCmpVision.cpp @@ -30,7 +30,7 @@ class CCmpVision : public ICmpVision public: static void ClassInit(CComponentManager& componentManager) { - componentManager.SubscribeGloballyToMessageType(MT_ValueModification); + componentManager.SubscribeToMessageType(MT_ValueModification); } DEFAULT_COMPONENT_ALLOCATOR(Vision)