Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Garbage handling (memory concerns)  (Read 641 times)

Gaspa Craftdreams

  • Bay Watcher
    • View Profile
Garbage handling (memory concerns)
« on: May 05, 2011, 12:20:03 pm »

Copying from an existing post on a suggestion from Footkerchief.

Currently, in fortress mode, all units that are deceased or traded away in cages remain in memory until you quit the game.  Can the next version simply cull deceased and traded units every season and just generate a condensed list of important dead figures without taking up unit slots?
Logged

blizzerd

  • Bay Watcher
    • View Profile
Re: Garbage handling (memory concerns)
« Reply #1 on: May 05, 2011, 12:35:44 pm »

let it just remember the dead for as long as there is a corpse laying around, if the corpse is butchered or rotten away, or fell in a chasm it will take 30 days to autoprune


something like that
Logged

Maklak

  • Bay Watcher
    • View Profile
Re: Garbage handling (memory concerns)
« Reply #2 on: May 05, 2011, 04:29:24 pm »

The game keeps track of who killed who, so deleting it completly is probably not an option. I'd be quite happy with a filter function for units screen, tough.
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: Garbage handling (memory concerns)
« Reply #3 on: May 05, 2011, 06:19:44 pm »

In the grand scheme of things, they are not hurting anything. It would take a LOT of dead monsters to make a dent in memory hehe.

Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

Wyrm

  • Bay Watcher
    • View Profile
Re: Garbage handling (memory concerns)
« Reply #4 on: May 05, 2011, 06:25:51 pm »

Cull the list for named units a few seasons' dead, quicker if they're buried or otherwise memorialized — presumably the ghosts of these creatures will not be coming back at that point, nor will there be zombies. Cull the list for unnamed units when their remains are dealt with, like made into totems and such. There's no reason to keep them on the list in perpetuity, where they just take up visual clutter.
Logged

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Garbage handling (memory concerns)
« Reply #5 on: May 05, 2011, 10:49:04 pm »

Actually, the best thing to do would be to do a Memory Flush at the autosave points.  Make sure everything in the Current folder is written over to the main save file, then erase anything the game wouldn't have loaded back in.  Memory concerns: Gone.
Logged
I like fortresses because they are still underground.

sockless

  • Bay Watcher
    • View Profile
Re: Garbage handling (memory concerns)
« Reply #6 on: May 06, 2011, 04:08:44 am »

How much memory does DF take up on your computer?

In many apps, especially DF, the faster you make something the more memory it takes up, the less memory it uses, the slower it goes. Most DF users have plenty of RAM and can quite easily get more. A faster processor on the other hand is a lot harder to acquire.

I think that Toady should be more concerned with making the game faster.
Logged
Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.
What color was the mailman's hair?

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site
Re: Garbage handling (memory concerns)
« Reply #7 on: May 06, 2011, 05:30:37 pm »

It also depends on if the creature list is ever 'walked' by the code.

DF probably already does not do this, but when the game loops through creatures, such as the AI processing on every frame, it would be best to have a seperate list of living and dead creatures, instead of looping through every creature ever, and asking 'is it alive?, then do AI' (thinking about it, I would have a queue of when the next AI action for an entity is due, barring interupts)
Logged
Quote from: Karnewarrior
Jeeze. Any time I want to be sigged I may as well just post in this thread.
Quote from: Darvi
That is an application of trigonometry that never occurred to me.
Quote from: PTTG??
I'm getting cake.
Don't tell anyone that you can see their shadows. If they hear you telling anyone, if you let them know that you know of them, they will get you.