Save files at this stage are 1.2 MB, so quite big, but it's a long game with looots of lines. About 100 vars so far, all inited with `default x = y`. There are no complex structures saved, just scalars.
Every rollback (mousewheel up) takes about 0.5 - 1 sec, and saving the game in a new slot takes 2 sec. When I do a big mousewheel up (10 clicks or so), the game keeps rolling back, line by line, slowly, unpresponsive, until it's 10 lines back. If I open an old save (500 KB), rollback is much faster, but still not instant like in many other games. The strange thing is that fast forward is still super fast, for both saves equally fast.
I tried playing from my SSD and my external HDD, and both are very slow, so it's not disk speed. I've not tried another PC. Scene images aren't big at all. There are very few screens, and very few layers. All sound is disabled.
I'm not sure which Ren'py I'm running, but there's no game-32.exe, so it's not super new.
Any idea what it could be? Is it because the save files are so big? But why are they so big, and getting much bigger?
Why are rollback & save so suuper slow, but ffwd is still fast?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Newbie
- Posts: 6
- Joined: Wed Jun 23, 2021 4:50 am
- Github: Siege-Wizard
- Contact:
Re: Why are rollback & save so suuper slow, but ffwd is still fast?
Probably has to do with forward just requiring to evaluate the next statement in the script while saving requires to collect all the values in all the variables and rollback requires to know what changed with the last step forward and reverting all that.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Why are rollback & save so suuper slow, but ffwd is still fast?
How much of your ram is free, it could be overflowing the cache and reverting to swap (virtual memory on Windows) which will significantly slow things down.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Re: Why are rollback & save so suuper slow, but ffwd is still fast?
> while saving requires to collect all the values in all the variables and rollback requires to know what changed with the last step forward and reverting all that
But why is it only SO slow for this game? I don't understand the difference. 100 scalar vars shouldn't be that much trouble. Other games have 100 vars and still rollback fine. What could possibly need 0.5 sec for a single frame rollback??
RAM is fine. 7 GB free, far from swap. It does feel like that. Like lots of I/O is needed for a rollback. But even that shouldn't need 0.5 sec for a single frame rollback. This is SO slow. Even on SSD.
Game load and refresh are fast. Other games too. Ffwd too. Just rollback is super slow. I've seen this in a FEW other games, but I don't remember. No problems in 90 % of Ren'py games.
But why is it only SO slow for this game? I don't understand the difference. 100 scalar vars shouldn't be that much trouble. Other games have 100 vars and still rollback fine. What could possibly need 0.5 sec for a single frame rollback??
RAM is fine. 7 GB free, far from swap. It does feel like that. Like lots of I/O is needed for a rollback. But even that shouldn't need 0.5 sec for a single frame rollback. This is SO slow. Even on SSD.
Game load and refresh are fast. Other games too. Ffwd too. Just rollback is super slow. I've seen this in a FEW other games, but I don't remember. No problems in 90 % of Ren'py games.
- PyTom
- Ren'Py Creator
- Posts: 16093
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Why are rollback & save so suuper slow, but ffwd is still fast?
I'd suggest setting config.dump_save = True, and saving, and seeing what managed to leak into your savefile that shouldn't be there.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom