- Jul 17, 2019
- 2,295
- 961
Oh, that's good info.renpy.python.store_dicts["store"].ever_been_changed.remove( n )
Unfortunately... I went and did that for ~150 of the temp variables and that saved me 15kB at best, out of what's now over 6Mb (compared to the <550kB starter save). I'll keep going when I can muster the courage again, but it looks like unless there's a massive one somewhere, that isn't it. There's another 350 left in
renpy.python.store_dicts["store"].ever_been_changed
, and I'd guess less than 300 can be safely removed.Most are just strings or numbers. Some are lists or other objects. But virtually all of them are overwritten, so even if they're mutable, it doesn't matter.But look at it that way:
...
So, all depend of the nature of those temporary variables.
Okay, yeah, that's my bad. It looks like moving all calculations to functions wherever possible is the idea.Labels are at global level, there's no reason for their variables to be seen as garbage.
The point being it will likely pass far, far more frequently than the interaction-count-based autosave. Unless I'm misunderstanding what 'choice' refers to here. It is the menus, right?And like you can see, it pass through the exact same process than a regular autosave ; test if it apply, then call the function that will start/call the autosave thread.
Yeah, okay, that is true.It's not just about the time needed to do the processing, but also when this processing happen.
What I have doesn't play out quite like that, though, because Slut equivalents don't change while the screen itself is open. Rather, I change screens, do stuff with them, possibly including running labels, then come back to the original screen. I can also change their state before opening the screen.
I could possibly go and change the calculations around so that there actually is a flag 'show_Big_Red_Button' and not a calculation... But that'd require a lot of changes everywhere.
I settled for just disabling the button when returning, since it's actually not likely be used after the initial opening.
No, just before showing the screen, after my initial post about it.You pass from an algorithm that correspond to a "hey, girls, can you tell me what is your state ?" performed every round
Purely out of curiosity, what's the difference between aWell, it obviously have a bigger influence than atextbutton
, that do the same but in a purely optimized way. And here it can effectively be noticeable, because there's more to proceed.
textbutton
and a button
with text?I just looked, and fortunately the only actual
button
s I have are in the save/load screen.Which is why I paged the thing. It used to show 20 and half of the next row, now it's just 20 which is only ever so slightly sluggish. I mean, I can't speedrun my cursor across buttons and get the hovers to light up, but everything else is okay-ish.What is a killing point. It mean that Ren'Py will built and display the whole screen... but most of it will be not seen because outside of the window.
Perhaps I should ditch the whole viewport now.
That's good to know, thanks.Avpgrid
would still take time, but for each entity in it, Ren'Py will first look if it's inside the window or not ; and if it's not it will just ignore it.
Edit: But, well, my biggest issue is still there. Despite turning off autosave, despite removing all
renpy.free_memory()
and garbage collection calls, turning off rollback and trying different renderers... I still get mini-freezes every minute or so. It's not really limited to any one place, either, although I can't get it to reliably trigger without actually playing and changing game state.The only thing I can guess at is that it might be related to loading images... But the game and thus the images are on an SSD, and general RAM use doesn't seem to be a bottleneck. The game will happily triple it's footprint just before crashing (and possibly cause system instability if other memory-intensive programs are open).
Last edited: