Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-12-22 13:26:59 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-12-22 13:26:59 +0400
commitff9974ed69bf2b71a569191cc06ae909217ffd2c (patch)
treed127d2161a4e71edd6a29ae9ade7a34c10608a51 /source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
parent78698a2ecf9d17340ce337ecf73ce6e355299f89 (diff)
Fix T37898: blenderplayer painfully slow in recent builds
Issue was caused by recent image cache rewrite and root of the issue goes to the fact that blender player doesn't initialize cache limiter and it uses 32meg of memory only. This leads to infinite image loading/freeing. For now disabled cache limiter in game engine, this brings back old behavior. In theory we might be smarter here, but better caching policy is to be discussed.
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_ghost.cpp')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 14b5bca1101..b04dbc75fe4 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -52,6 +52,8 @@ extern "C"
{
#endif // __cplusplus
#include "MEM_guardedalloc.h"
+#include "MEM_CacheLimiterC-Api.h"
+
#include "BLI_threads.h"
#include "BLI_mempool.h"
#include "BLI_blenlib.h"
@@ -437,6 +439,7 @@ int main(int argc, char** argv)
free_main(G.main);
G.main = NULL;
+ MEM_CacheLimiter_set_disabled(true);
IMB_init();
BKE_images_init();
BKE_modifier_init();