lategame fps increase: delete "world pawns" from save file

Started by 14m1337, December 02, 2016, 08:39:03 AM

Previous topic - Next topic

skullywag

Quote from: Tynan on December 08, 2016, 08:22:57 PM
A16 will do this automatically, so you shouldn't need to do this yourself in future.

Thanks Tynan.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

14m1337

Quote from: Tynan on December 08, 2016, 08:22:57 PM
A16 will do this automatically, so you shouldn't need to do this yourself in future.

:thumbsup:
Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

FrozenSnowFox

#17
Quote from: Tynan on December 08, 2016, 08:22:57 PM
A16 will do this automatically, so you shouldn't need to do this yourself in future.

In A16 my 6 year old colony has 7-8mb of junk data for dead pawns.  I started with 4 rabbits and increased that to about 15 Females and kept them for about 4 or 5 years.  The social panel had hundreds of rabbits listed and lagged the game to hell when it was open.  Growing tired of the constant butchering and fearing save implosion I got rid of them all and got chickens instead which I use only for eggs.  A year later my save still contains hundreds of entries for rabbits.

I'm not sure what you planned to delete automatically but I imagine the several hundred rabbits with zero connection to anything and no existence in the world should have been purged.  However the relationships on living creatures should be purged as well.  It should never get to 200+ dead relatives of junk data.  There needs to be some kind of cap to prevent save bloating.  Given the numbers small quick breeding animals can spawn hundreds or even thousands of young over the course of several years.

14m1337

dead allies/colonists/npcs/animals don't count here as these do NOT consume any CPU time. it's all about the living world pawns.
manually deleting the dead from the savegame was merely something cosmetic.
Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

Bozobub

Wrong.  This was (and is still, perhaps) a known issue (up to A15, at least), where dead pawns use up ticks.  People with very old colonies (hence hundreds or thousands of defunct entries) in A15 generally experience dramatic FPS increases by "cleaning" the save in this manner.

I'm NOT sure, however, that animals cause the same slowdown issue(s).
Thanks, belgord!

Rhamphoryncus

A quick test on my map (A16, 3 year colony, 9 colonists, 6 pets, lots of mods) and deleting all entries from pawnsAlive bumped me from 18 fps to 30 fps.

Also broke my comms console, heh.  For now I'll leave it as an experiment and keep playing the unedited save.

14m1337

Quote from: Rhamphoryncus on December 30, 2016, 11:05:35 PM
A quick test on my map (A16, 3 year colony, 9 colonists, 6 pets, lots of mods) and deleting all entries from pawnsAlive bumped me from 18 fps to 30 fps.

Also broke my comms console, heh.  For now I'll leave it as an experiment and keep playing the unedited save.
Quote from: 14m1337 on December 07, 2016, 08:34:49 PM
first, look for <factionmanager> in your save file, expand to <allfactions> and then expand all factions there. there will be some spacers, mechanoids, and also the factions that you can see when you look up the factions ingame. the information we need here is contained in the <name> <loadid> and <leader> tags. especially the <leader>... they look like "Thing_Human733". make yourself a note of the leaders of "your" five factions. these are the ones that you should never delete!

I deleted all but these five pawns from <pawnsForcefullyKeptAsWorldPawns> and <pawnsAlive> in my actual savegame, and it really improved the game speed.


so it seems the structure of the save files didn't change in A16 (I didn't have a look into it yet)
Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

zandadoum

i don't even know where the savefile is lovated, can any1 hint me into the right direction?

zandadoum

deleted only deadpawns... didn't want to risk tampering the rest
savefile went from 42MB to 29.5MB

lag is still the same, plus all the dead relatives info on social tab is lost (obviously)

i7 4ghz
32gb ram
ssd

game only uses 15% CPU running at max speed when colonists are working (no raid or manhunter)
game only uses 1.1GB ram

i guess this is yet another of those damn Unity limitations... i heard upgrading to the latest version ain't that hard from a programming standpoint, @Tynan maybe would worth looking into?

MisterVertigo

#24
I think Tynan did upgrade the Unity engine with A16, but I could be wrong. I am sure I read that though. I don't know if it's the LATEST though.

Edit: Spelling
"In vertigo you will be..."

"Relax, people. It's a teeny indie game; don't kill it with love." - Bozobub

14m1337

rimworld only uses ONE core of all those mega multicore CPUs, and is not coded for a 64bit architecture.
I personally hope that this will be done for the final release (or maybe already in beta status) - before it doesn't make sense in terms of coding.
as far as I understood the long text of my coder pal, coding for 64bit and multicore-usage is much more complicated.
Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

Zhentar

64-bit RimWorld is just picking a different option in the build target drop down list. The linux builds already are 64-bit. But there's little value to be had for RimWorld, so I doubt we'll see a 64 bit Windows build in the near future.

Multithreading on the other hand is a huge task, and much of what RimWorld does is not easily broken down into smaller work units the way it works today because there are a lot of dependencies. The one thing I can think of that would likely have a remotely reasonable cost:benefit is world pawn ticking... but simply reducing the number of world pawns and/or the performance cost of ticking them gets the same performance outcome with much less work & fewer issues down the road.

Mekhet

Quote from: Zhentar on January 05, 2017, 02:55:58 PM
64-bit RimWorld is just picking a different option in the build target drop down list. The linux builds already are 64-bit. But there's little value to be had for RimWorld, so I doubt we'll see a 64 bit Windows build in the near future.

Multithreading on the other hand is a huge task, and much of what RimWorld does is not easily broken down into smaller work units the way it works today because there are a lot of dependencies. The one thing I can think of that would likely have a remotely reasonable cost:benefit is world pawn ticking... but simply reducing the number of world pawns and/or the performance cost of ticking them gets the same performance outcome with much less work & fewer issues down the road.

Imagine up till today minecraft still lacks multicore support (which really is a pain to all those ppl like me overdoing mass production ^^) so it wont be such an easy task i imagine

Dirty Foot

Quote from: Tynan on December 08, 2016, 08:22:57 PM
A16 will do this automatically, so you shouldn't need to do this yourself in future.

I just experienced a bug that brought every friendly faction member to my base all at once and then they left. Immediately, my FPS tanked and I looked for a solution. I found this thread and followed the directions and my FPS jumped back to 80. However, this comes at the cost of not having other factions in the game anymore.

Then I stumbled on your comment and was wondering if maybe there's something I need to do in order to have the game do this on its own. Furthermore, will the result be the same (i.e., will I still lose the ability to communicate with or be raided by other factions?)?

Thanks!

Zhentar

There's not anything you need to do; A16 is much better about trimming down the worldpawns list but caravans added many new opportunities to create worldpawns so the two have somewhat cancelled out. I've found and reported a bug that's keeping some worldpawns around when they shouldn't be, and I think we'll get some other tweaks in A17 to do a better job of keeping down the worldpawns.