diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-12-22 13:26:59 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-12-22 13:26:59 +0400 |
commit | ff9974ed69bf2b71a569191cc06ae909217ffd2c (patch) | |
tree | d127d2161a4e71edd6a29ae9ade7a34c10608a51 /source | |
parent | 78698a2ecf9d17340ce337ecf73ce6e355299f89 (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')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 3 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/SConscript | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt index 6a5d97e8ede..df752799c2c 100644 --- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt +++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt @@ -50,6 +50,7 @@ set(INC ../../../../intern/ghost ../../../../intern/guardedalloc ../../../../intern/string + ../../../../intern/memutil ) set(INC_SYS 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(); diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript index 1b1d1fc1d91..3e8ab3d0dd7 100644 --- a/source/gameengine/GamePlayer/ghost/SConscript +++ b/source/gameengine/GamePlayer/ghost/SConscript @@ -41,6 +41,7 @@ incs = [ '#intern/string', '#intern/ghost', '#intern/guardedalloc', + '#intern/memutil', '#intern/moto/include', '#intern/container', '#intern/audaspace/intern', |