Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 6:18 pm
All times are UTC + 0
Memory comparo: dots vs line
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue May 10, 2016 8:38 am    Post subject:  Memory comparo: dots vs line Reply with quote  Mark this post and the followings unread

Freshly opened jumbo.vxl on VXLSE, having done nothing = opened.jpg

Draw a line of dots with pencil on the current layer = newdots.jpg

Draw a similarly long line with line tool = newline.jpg

Hope this helps? Bloating 20MB for 1 operation is probably exaggerated since I am using my largest voxel, but still seems out there.



opened.jpg
 Description:
 Filesize:  239.81 KB
 Viewed:  5609 Time(s)

opened.jpg



newdots.jpg
 Description:
 Filesize:  228.98 KB
 Viewed:  5609 Time(s)

newdots.jpg



newline.jpg
 Description:
 Filesize:  231.77 KB
 Viewed:  5609 Time(s)

newline.jpg



_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue May 10, 2016 10:47 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue May 10, 2016 12:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue May 10, 2016 12:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue May 10, 2016 2:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue May 10, 2016 2:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

good point.
I guess only Banshee can answer this.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue May 10, 2016 5:13 pm    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Tue May 10, 2016 11:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message Visit poster's website Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed May 11, 2016 1:36 am    Post subject: Reply with quote  Mark this post and the followings unread

Are you storing the model (for each undo level) as the original voxel format, or some extrapolated point cloud thingamabobber that uses more bytes?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed May 11, 2016 5:41 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed May 11, 2016 6:00 am    Post subject: Reply with quote  Mark this post and the followings unread

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).

Back to top
View user's profile Send private message Visit poster's website Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Thu May 12, 2016 10:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Are you able to find out what is being left behind in memory?

Could you possibly make it allocate repeated patterns for data you could search a memory dump for and identify the offending section of code?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu May 12, 2016 3:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message Visit poster's website Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Thu May 12, 2016 5:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

I just tested 530 for 1min, the memory spikes up then falls back down... so far so good Smile

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat May 14, 2016 2:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Excellent, I was working on a Cessna for the last hour and a half, memory usage is stable at 32MB Smile

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.1704s ][ Queries: 16 (0.0118s) ][ Debug on ]