I would guess this is a sideeffect of the undo function?
Storing the state of every voxel and the action that was done isn't that small.
255x255x255 (biggest voxel)=16.581.375
Let the program use 1 byte for each voxel and you have your 20 MB full in no time. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Line operations take much less apparently, but I drew the dots in one sweep, so I figured that would be 1 operation as well as far as undo is concerned?
I suggested maybe a cap of 20 levels of undo, that might keep a handle on things too? Or perhaps find an alternative way to record the actions, instead of the entire model... _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
from my programming point of view recording only the done actions and not the entire model is a lot more error prone (though no clue how Banshee coded SHP Builder). And nowadays with 8-128 GB of RAM on most PCs, it shouldn't matter anymore if a program needs a few MB for such simple operations.
It might be an idea though to make SHP Builder store the steps in temporary files on the HDD, instead of keeping them in the RAM
and maybe also have an option in the settings to define the max number of undo-steps. _________________ SHP Artist of Twisted Insurrection: Nod buildings
It's not a question of ram, it's a question of bits, at 32bit it caps out at 3.4gb, and somehow I doubt he has much interest in making it a 64bit addressing model.
Once you hit 3.4gb there's two possible outcomes:
- program remains responsive, but you are stuck unable to do anything else as it throws errors
- program exceeds 3.4gb in the middle of a large operation, and becomes limboed, effectively unable to recover, but not necessarily frozen
In the case where you approach the limit 20mb at a time, and your next operation would go over (like using the pencil), the program just disallows the action with alert dings -- saving in this state is still possible but risky. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
Just tried a memory cleaning app because of this thread - http://www.koshyjohn.com/software/memclean/
Neither undo nor save seems to be affected with VXLSE and its usage gets reduced to about 1mb. QUICK_EDIT
Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Tue May 10, 2016 11:00 pm Post subject:
For your information, VXLSE III stores the whole voxel for each undo/redo step to be less prone to errors. This is different from OS SHP Builder, which stores each step and gave me a bunch of headache with that.
VXLSE III has some kind of serious memory leak that I'm not being able to detect here. QUICK_EDIT
As an aside, it seems like using pencil and eraser use far more memory than other operations, even when used contiguously, which should only generate one undo level. Is there perhaps a way you can optimize how those multi-part actions are recorded to be similar to the one-part line or box tool? _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Wed May 11, 2016 6:00 am Post subject:
I'm not compacting data at the Undo at this moment. And the possibility of Eraser and Pencil using more data happens because there are two ways to store Undo data in VXLSE III. One of them is through Temp View (such as Pencil and Eraser, it stores only the voxels that are temporarily displayed in the main canvas, when you use brushing tools) and the whole voxel, for everything else. I'm actually very surprised that Temp View takes more space than the whole voxel.
PS: There is a new revision which reduces memory usage (under some conditions). QUICK_EDIT
Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Thu May 12, 2016 3:28 pm Post subject:
OK, I've figured out that Delphi has an interesting tool to figure out what is being left in the memory. So, when I worked on revision 530, I've made a good use of it and it seems that most leaks were related to the rendering classes. Nothing was found in the Undo/Redo procedures. QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum