Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Wed Mar 10, 2004 2:56 am Post subject:
Stu, read this! (about undo)
I've been checking the undo feature you added, and it's a bit err... not optimized. For every single move, you add the whole SHP to the memory. I know there are some functions that, if you dont do that, you cant revert to the old situation, like the resize, autoshadows, etc... but some others are really not need store the whole SHP like brush and some others. The point is... that in some infantry and big buildings like the shipyards from RA2, this consumes a heavy ammount of memory. In 300 steps with the shipyards, only undo would take over 300mb (!!!) of your RAM. I'll try to create a better solution for this, specially by putting in the RAM only the 4 last moves and leaving the rest in a temp file... and I'll also try to make the basic steps to have smaller ways to hold their data with pointers, as well as only storing the images that were modified, instead of the whole file... This program is getting a way faster recently, but it's consuming more and more memory... sometimes we must say "STOP, it's enough!". I've also made autoshadows speed up incredibly (and select the correct colour instead of a remapable :S) and I'm messing up with Cameo Generator now... QUICK_EDIT
Undo stores one frame not the whole shp. Also note that it only stores the differences. Unless its an operation that you need to take the whole frame. So you are compleatly WRONG.
Note: Autoshadows and resize were never able to workwith undo because it doesn't store the whole shp. If it stored the whole shp then there would b no problems with making it work with every single operation, since it doesn't here are problems trying to make it work with everything while keeping it using a small amount of ram.
So on the undo issue you are compleatly wrong, it only stores whats needed (thus optimised).
Id advise you to not tinker with it until you understand how it works (which u clearly do not know)
Open Gi.shp, keep drawing lots of stuff, try different colours, tell me when ur pc starts to b slow.
Page File usage enver went up when drawing, did go up a few mb's when gi.shp was opened.
Note: a game would consume much more memory then bs shp builder, also pointers would only speed up creating undo "saves" but they do not cause lag so i don;t see the point in pointers. _________________ Free Map Editor - Game Requirements - Stucuk.Net 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