Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix rename optimization during save #1111
During saving, there was some code to check if a frame changed position but was not modified so that a simple file rename could be used instead of a full image render and write.
However, there were many bugs that prevented this from working properly. I hope I have fixed them all. The most major one was caused by changes to the image loading, which would cause all frames to be loaded into memory during save. This fix will reduce memory consumption and increase the save speed by fixing this.
Thanks @Jose-Moreno for his extensive memory testing which brought this issue to my attention.
I have tested these changes in multiple scenarios and it is behaving as it should, but if I did make a mistake this could reintroduce the file wiping issues in the worst case scenario. So please review and test these changes thoroughly before merging.
Hopefully the others can review the code as well as I can only help by testing.