Memory issue on Hardware Acceralation & Skipping
Posted: Fri Mar 29, 2013 9:27 am
I've been struggling ren'py's memory issue, and recently found there are 2 factors: hardware acceleration, and skipping.
Problem here is, hardware acceleration is system dependent. So I think I'd put my result here to ask someone to join investigating this issue further.
Firstly, This is the file I'm using to investigate memory issue: After you launched it, press Tab key. Then image loading starts.
The code is following:
I tried various combination of config.skip_delay and config.image_cache_size, changing software/hardware renderer.
The following data is with Windows 7, Core i3, Intel HD graphics 4000 (the driver version is 2013 one)
・When I use software renderer, and skip_delay = 200, and image_cache_size=0, RAM usage is stable around 70~90MB.
・When I use software renderer, and skip_delay = 25 (default), and image_cache_size = 0, It never release RAM and crashes soon.
・When I use hardware renderer, skip_delay = 25, image_cache_size=0, It's stable at 170~190MB. But when I minimize the window, it becomes 100mMB.
・When I use hardware renderer, skip_delay = 25, image_cache_size=8(default), It's stable around 400MB. But when I minimize the window, it becomes 100MB.
・When I use hardware renderer, skip_delay =0, image_cache_size = 0, It never release RAM and crashes soon. This setting also has interesting result. When I stop skipping before crash, like 1600MB usage, it becomes 800MB. And this 800MB becomes permanent RAM usage even I reload the game, restart the game, e.t.c. But when I minimize the window, it becomes 100MB.
Problem here is, hardware acceleration is system dependent. So I think I'd put my result here to ask someone to join investigating this issue further.
Firstly, This is the file I'm using to investigate memory issue: After you launched it, press Tab key. Then image loading starts.
The code is following:
Code: Select all
init python:
config.skip_delay = 0
config.image_cache_size = 0
label splashscreen:
jump start
label start:
while True:
python:
for l in ["60", "50", "40"]:
for k in ["1","2", "3"]:
for j in ["1","2","3","4","5", "6"]:
for i in ["a", "b", "c", "f", "l", "n", "p", "s", "z" ]:
renpy.scene()
renpy.show("image", at_list=[truecenter], what=im.Composite((935,1280),
(0,0), "large/rio%s.png"%l, (0,0), "large/rio_%s.png"%i,
(0,0), "large/rio_x%s.png"%j, (0,0), "large/rio_xx%s.png"%k))
narrator("")The following data is with Windows 7, Core i3, Intel HD graphics 4000 (the driver version is 2013 one)
・When I use software renderer, and skip_delay = 200, and image_cache_size=0, RAM usage is stable around 70~90MB.
・When I use software renderer, and skip_delay = 25 (default), and image_cache_size = 0, It never release RAM and crashes soon.
・When I use hardware renderer, skip_delay = 25, image_cache_size=0, It's stable at 170~190MB. But when I minimize the window, it becomes 100mMB.
・When I use hardware renderer, skip_delay = 25, image_cache_size=8(default), It's stable around 400MB. But when I minimize the window, it becomes 100MB.
・When I use hardware renderer, skip_delay =0, image_cache_size = 0, It never release RAM and crashes soon. This setting also has interesting result. When I stop skipping before crash, like 1600MB usage, it becomes 800MB. And this 800MB becomes permanent RAM usage even I reload the game, restart the game, e.t.c. But when I minimize the window, it becomes 100MB.