Jump to content

Farms cause significant frame rate drops


Recommended Posts

On 14/6/2016 at 2:25 AM, rezecib said:

I think it's because, really unlike any other structure in-game, farms are actually made up of a bunch of prefabs-- each little rock and fencepost and so on is its own prefab for farms. Perhaps if their art was remade as a single entity, it would improve things. But that would be a lot of work...

probably if we change all textures for the prefab components of the farm to blank textures... that could help?, the entity will be there but invisible, sometimes I use those farm components to decorate massively and I never had problems with the framerate related to them

On 15/06/2016 at 6:10 AM, V2C said:

Thanks for the info! We'll have this fixed in our next patch.

Hi !

First of all, thanks ! And sorry.

I just see the fix, so I test it. I have just launch my game (ok, I have not desactivated my mods for this test, I can do it if you want, but according to my own previous tests, the mod I use do not create more lag) and I just go in the middle of my camp.

As you can see, my fps is still... 32...  (less than one minute playing...)

So, maybe you have fix the farm... But as calculuschild was saying, what about other objects ? Wall for example ?

On 15/06/2016 at 3:51 AM, DarkXero said:

The huge issue here is that farm decor has a network component.

And I want to ask V2C (or any other Klei dev) too... How do you fix the problem ?

The fact that the farm DECOR as network component, as far as I know, seems very strange to me. Images are huge object to go to network. Usually, all decors must be only saved in local. The sever is the one who really knows where objects are positionned, the state of this objects, ok, but the "view" of this objects must be only coded in the client part, no ? (I can imagine, at the initialization phase, that the server send things about it but not in game, and absolutelty not all the time...).

The server say : wall at position x/y, z lifepoint, and the client draw it, but it doesn't matter to the server how the client draw it. Decor has nothing to do with the server.

Well. Humm... Sorry again about this message, I was so happy when I see the fix, and I'm do disapointed now. So I will finish this message by repating my request.

Please Klei, takes times to really investigate this lag problem. As I said before, there is really a big room of improvement, the farm problem prouves it. 

It is a MAJOR problem that must be fixed.

Please.

 

fps after update.png

4 minutes ago, Onirian said:

The fact that the farm DECOR as network component, as far as I know, seems very strange to me. Images are huge object to go to network.

They no longer have the network component. But to clarify on how it worked before, it doesn't send any images; the game never sends any images over the network. It merely sends the name, position, etc (essential data) over the network, and the client creates its copy from that.

But now that they removed the network component, only the farms are networked and the decor is added locally on each client, as you suggested.

5 minutes ago, rezecib said:

But now that they removed the network component, only the farms are networked and the decor is added locally on each client, as you suggested.

Ok, thanks for this great precision ;).

But there is still a real big problem, look at my screenshot, maybe more complicated to solve, but still here...

Your situation looks like doesn't have any secret issue underlying. You should try going in and out of your base (like 20 times), and see if the entity count keeps growing over 5000 and beyond. If it does, then some entity has the same problem as farms. Something spawns again and again and inflate the entity count.

It also can be that it's just the game. You just have a lot of networked entities, all close. Trees, racks, farms, chests, items in chests, bushes, walls, everything adds up. Even in single player you can reach a point where you just have too much clutter nearby.

I spawned 2000 logs on my server, and as a client, my FPS took a dive to the 30s zone. Then I regenerated the world, and spawned 2000 farmrocks, but my FPS didn't suffer. It reached the 30s zone when having 8000 client farmrocks. So I don't really know what can be done here.

Maybe reduce a lot the range where entities are awake for clients? Maybe, instead of having a quadrillion separate networked entities, have a Client Prefab Manager for each prefab, that spawns and removes client side prefabs accordingly? Maybe hide them instead of removing them, only remove them if they update and the server told the manager that they are no more?

tumblr_inline_nmnfrqaqnG1rmsakh_500.gif

Hi DarkXero (and thanks for your anwser, your're a hero !).

So, as you suggested, I made some tests.

Here is the result :

  • Center of my base, at spawning : Entity count : 3441 (2379 awake), total network entity : 2895, fps 30.
  • Far of my base :                           Entity count : 1322 (274 awake),   total network entity : 1027, fps 60.
  • Center of my base, after 1 run*  : Entity count : 3562 (2517 awake), total network entity : 2880, fps 30.
  • Center of my base, after 10 run : Entity count : 3670 (2609 awake), total network entity : 2976, fps 30.
  • Showing the global map from far: Entity count : 1378 (264 awake),   total network entity : 1019, fps 58.

* : a "run" here was : go far (where fps is 60) and go back into the center of my base.

So, first of all, correcting the farm problem, has solve few issues. Before this correction, showing the global map  made my fps goes to 30, even if I was far. Here, the fps is 58, which is ok. And the fps in the game is slightly better (since the correction, I never fall under 20).

When we look at the result, maybe there is still a few memory lack, but really not enough to justify specific investigation, and, for evidence, it's not the cause of the lag problem. So this problem is completely fixed.

 

I have ever do a megabase in single mode (or see it on twitch). Few things can create lag problem (using the glitch to have a lot amount of tree at the same place for example), but not a "simple camp" as the mine is.

 

So, because when I spawn my fps begin at 30 and do not grows up to 60 after few seconds (I can understand that initialization needs more data), my theory is that the problem is too much objects was updated, even if they don't need. 

On 2900 objects (network entity), how many must be really updated in real time ? I can't see what informations transit by the network so it's impossible to me to confirm, but maybe, an improvement could be to update object only where there is a real update on it. For example, a tree could be updated only when his state really changes (the tree grows up). So, it was at most, one time by day (nearly nothing).

The player and all animated characters (pig, spider, hound...) must be updated in real time, ok, but it still work, because far from my base, fps was 60. But for all other object, the network update should be very very low. Wall, chest, object in front of my chest must be nearly never updated (or, for example, every 10 seconds, to avoid network problem, and not all in the same times of course...).

Any idea if my theory seems valid to you ?

 

7 hours ago, Onirian said:

far from my base, fps was 60.

I get the same kind of behavior.  Even in a dense forest with lots of trees, my FPS is usually pretty OK.  It's not until I get into my base that things start to get notably sluggish, and I usually only have the most basic base (campfire, crockpot, fridge, birdcage, alchemy machine, maybe a chest or two, and about 5 advanced farms.)  I can wander just fine through most other areas unless I get tons of spiders, but when I get into the base I have a hard time just positioning myself in front of the fridge to open it up since I play with a controller.

@Onirian You can also try comparing the output of c_countallprefabs() after doing those runs, to see what entities are increasing in count. Although not all entities are prefabs (there are a few FX things and stuff that never get a prefab name), and those will be hard to track down if they're the culprit Edit: they just added in a part to count unknown prefabs there as well. Probably the easiest thing to do is have your log file open and copy the listing it prints out into a spreadsheet or something.

Although whatever these entities are, it doesn't look like they're contributing significantly to the FPS loss. One thing that is probably a significant factor in your base are walls-- although their collision code has been greatly improved from single-player, they are still pretty costly. I think there used to be a mod that removed collision from walls, but I'm not finding it now... So I made this small one to do it.

Hi rezecib !

Thanks a lot ! I will to the c_countallprefabs() test and try your mod as soon as possible (The hour when I'm writing this is 00h47 so it will wait for tomorow ^^).

And for my own curiosity, what is the wall collision problem ? (I have few idea of what it can be, but I like to understand things ^_^).

 

ps : you are a hero too ! ;-))

Hi.

So I do the tests. First of all, disabling the wall collision doesn't help at all (as you can see in the screenshot).

Walls where effectively disabled (Koalefant can run out of their box and I can walk on it ^^), but with no visible effect on the lag. Wall collision was not the source of the problem.

Since my last screenshot, the lag is bigger, probably because I rebuild some improved farm (but it's still less lag than before the klei correction pointed by DarkXero).

I also do some tests with c_countallprefabs(). Here is the result :

  • Spawn in base : 167 prefab in the world, 2311 total,   1087 unknown
  • Spawn far :         53 prefab in the world,    236 total,   1081 unknown
  • 1 run :                168 prefab in the world, 2716 total,   1083 unknown
  • 2 run :                167 prefab in the world, 2923 total,   1087 unknown
  • 3 run :                169 prefab in the world, 3058 total,   1083 unknown
  • 4 run :                166 prefab in the world, 2988 total,   1083 unknown
  • 7 run :                168 prefab in the world, 3033 total,   1083 unknown
  • far (after 7 run) :  57 prefab in the world,   310 total,   1081 unknown

So, after the third run (we can say the second), prefabs number are stabilized. And when I'm far, their number decrease a lot. It means no memory leak here, it's not the source of the problem.

I think the "10xx" unknown are a bit strange, but considering they are here when I'm far (with no lag), they can't be the source of the lag problem.

I do not understand why the command say "xx prefab in the world" and "yy total". Maybe the first number is what is on the screen ? But why a so big difference with the second number ?

 

And I'm afraid that this lag problem will stay again for a long time...

fps with disabled wall.png

43 minutes ago, Onirian said:

I do not understand why the command say "xx prefab in the world" and "yy total". Maybe the first number is what is on the screen ? But why a so big difference with the second number ?

c_countallprefabs()'s numbers mean:

X different prefabs in the world - the number of different prefabs, two entities of the same prefab count as one
X total - total number of entities with non-nil prefab, two different entities of the same prefab count as two
X unknown - the number of entities with nil prefab, mostly widgets (i.e. all elements of UI)

So 50 drying racks count as 1 prefab (first number), 50 entities (second number) and 0 unknown entities (third number).

@Onirian In addition to printing out the totals, c_countallprefabs should also print out the counts of each prefab. You will probably have to look at the log file to see this in a useful way, as it will have ~170 lines of prefabs for you. This will help tell you which ones are increasing, as it appears that it's not the unknown prefabs that are increasing.

I guess it's a good thing that the wall collision didn't help at all, that means the optimizations they made for them were very good!

Here is the result from my log file.

The biggest values is for wall_stone (989) and wall wood (172), farmrock have value too (189 + 135 + 162), and trees after...

Nothing seems strange to me.

Even 1000 walls stone, considering that it's only walls (and collision is ok, which is not solving my problem but is great ^^) do not seems a lot to manage for me. And for what I know, they don't need any network update unless they are hit by something.

Is there any way to check what, when (and be fool, why ^^) objects are updated by network ? I try to do a wireshark trace in my first post on the klei bug tracker, but object are probably seralized (which is a good), so I can't understand by myself what is going threw the network.

 

Spoiler


[00:13:41]: amulet    1    
[00:13:41]: armorwood    11    
[00:13:41]: attunable_classified    1    
[00:13:41]: axe    1    
[00:13:41]: backpack    10    
[00:13:41]: bandage    1    
[00:13:41]: batwing    1    
[00:13:41]: beardhair    1    
[00:13:41]: bedroll_straw    1    
[00:13:41]: beefalohat    1    
[00:13:41]: beefalowool    3    
[00:13:41]: birdcage    2    
[00:13:41]: boards    1    
[00:13:41]: boneshard    1    
[00:13:41]: bugnet    1    
[00:13:41]: cane    2    
[00:13:41]: carrot_planted    2    
[00:13:41]: cave_entrance_open    1    
[00:13:41]: charcoal    1    
[00:13:41]: chester    1    
[00:13:41]: chester_eyebone    1    
[00:13:41]: chesterlight    1    
[00:13:41]: container_classified    1    
[00:13:41]: cookpot    4    
[00:13:41]: crow    5    
[00:13:41]: cutgrass    2    
[00:13:41]: cutreeds    2    
[00:13:41]: deciduoustree    129    
[00:13:41]: dragon_scales    1    
[00:13:41]: dragonflychest    3    
[00:13:41]: evergreen    81    
[00:13:41]: evergreen_sparse    5    
[00:13:41]: eyebrellahat    1    
[00:13:41]: farmrock    189    
[00:13:41]: farmrockflat    135    
[00:13:41]: farmrocktall    162    
[00:13:41]: fast_farmplot    27    
[00:13:41]: feather_crow    1    
[00:13:41]: featherfan    1    
[00:13:41]: fencepost    81    
[00:13:41]: fencepostright    54    
[00:13:41]: fertilizer    3    
[00:13:41]: fireflies    2    
[00:13:41]: firepit    1    
[00:13:41]: firestaff    1    
[00:13:41]: flies    6    
[00:13:41]: flint    2    
[00:13:41]: flower    32    
[00:13:41]: focalpoint    1    
[00:13:41]: footballhat    7    
[00:13:41]: forest_network    1    
[00:13:41]: gears    2    
[00:13:41]: glommer    1    
[00:13:41]: glommerflower    2    
[00:13:41]: goldenpickaxe    2    
[00:13:41]: goldenshovel    1    
[00:13:41]: goldnugget    2    
[00:13:41]: grass    176    
[00:13:41]: guano    2    
[00:13:41]: hammer    2    
[00:13:41]: heatrocklight    3    
[00:13:41]: homesign    3    
[00:13:41]: houndstooth    1    
[00:13:41]: ice_puddle    10    
[00:13:41]: ice_splash    10    
[00:13:41]: icebox    4    
[00:13:41]: inventory_classified    1    
[00:13:41]: inventoryitem_classified    30    
[00:13:41]: koalefant_summer    4    
[00:13:41]: koalefant_winter    4    
[00:13:41]: krampus_sack    1    
[00:13:41]: lantern    1    
[00:13:41]: lightning_rod    4    
[00:13:41]: livinglog    1    
[00:13:41]: log    117    
[00:13:41]: marble    1    
[00:13:41]: meatrack    46    
[00:13:41]: minerhat    2    
[00:13:41]: minimap    1    
[00:13:41]: mist    1    
[00:13:41]: molehat    1    
[00:13:41]: mosquitosack    1    
[00:13:41]: nightmarefuel    1    
[00:13:41]: nitre    1    
[00:13:41]: papyrus    1    
[00:13:41]: penguin_ice    2    
[00:13:41]: pickaxe    1    
[00:13:41]: pighouse    1    
[00:13:41]: pighousewindow    1    
[00:13:41]: pighousewindowsnow    1    
[00:13:41]: pigman    1    
[00:13:41]: pine_needles_chop    2    
[00:13:41]: pinecone    79    
[00:13:41]: pitchfork    2    
[00:13:41]: plant_normal    28    
[00:13:41]: player_classified    1    
[00:13:41]: pollen    1    
[00:13:41]: poop    5    
[00:13:41]: pottedfern    4    
[00:13:41]: purpleamulet    1    
[00:13:41]: rabbit    1    
[00:13:41]: rabbithole    14    
[00:13:41]: rabbithouse    3    
[00:13:41]: rain    1    
[00:13:41]: rainometer    1    
[00:13:41]: red_mushroom    1    
[00:13:41]: redgem    1    
[00:13:41]: reflectivevest    1    
[00:13:41]: researchlab2    1    
[00:13:41]: researchlab3    1    
[00:13:41]: resurrectionstatue    1    
[00:13:41]: rock1    2    
[00:13:41]: rock2    6    
[00:13:41]: rock_ice    10    
[00:13:41]: rocks    1    
[00:13:41]: rope    1    
[00:13:41]: sapling    1    
[00:13:41]: seeds    7    
[00:13:41]: sewing_kit    2    
[00:13:41]: shovel    1    
[00:13:41]: siestahut    1    
[00:13:41]: signleft    30    
[00:13:41]: silk    1    
[00:13:41]: skeleton    2    
[00:13:41]: slow_farmplot    3    
[00:13:41]: snow    1    
[00:13:41]: spear    2    
[00:13:41]: spidergland    2    
[00:13:41]: spiderhat    1    
[00:13:41]: spoiled_food    3    
[00:13:41]: stick    6    
[00:13:41]: stickleft    6    
[00:13:41]: stickright    9    
[00:13:41]: stinger    1    
[00:13:41]: tallbirdegg    1    
[00:13:41]: telestaff    1    
[00:13:41]: tent    1    
[00:13:41]: tentaclespike    1    
[00:13:41]: torch    3    
[00:13:41]: trap    16    
[00:13:41]: trap_teeth    16    
[00:13:41]: treasurechest    80    
[00:13:41]: trinket_12    1    
[00:13:41]: trinket_14    1    
[00:13:41]: trinket_3    1    
[00:13:41]: trinket_4    7    
[00:13:41]: turf_carpetfloor    1    
[00:13:41]: turf_forest    1    
[00:13:41]: turf_grass    1    
[00:13:41]: turf_marsh    1    
[00:13:41]: turf_rocky    1    
[00:13:41]: turf_savanna    1    
[00:13:41]: turf_sinkhole    1    
[00:13:41]: twigs    2    
[00:13:41]: umbrella    1    
[00:13:41]: wall_hay    42    
[00:13:41]: wall_stone    989    
[00:13:41]: wall_wood    172    
[00:13:41]: wall_wood_item    1    
[00:13:41]: walrus_tusk    1    
[00:13:41]: walrushat    1    
[00:13:41]: wardrobe    1    
[00:13:41]: wickerbottom    1    
[00:13:41]: winterhat    1    
[00:13:41]: winterometer    1    
[00:13:41]: world    1    
[00:13:41]: wormhole    1    
[00:13:41]: wx78    1    
[00:13:41]: There are 168 different prefabs in the world, 3033 total (and 1094 unknown)   

 

The 2311 run was when I have spawn in the center of my base, but before I do any move, so there is probably not all which are initalized. I thinks it's why the number is smaller than the run after two "go far / go back". By the way, here is the result. I do not see farm in the list, but walls are here (and my fps, was near 40).

The number of walls do not seems strange to me. Here is a picture of my base (I have installed your "Wall map icon" to see the wall). There is a lot of wall. I do not have counted them, but 900+ are probably close to the reallity.

Oh, and another few thing, when I have tried this mod, I saw a little bug. When this mod is active, we can't pass threw breaked wall (I try with wood wall). Don't know if it's a known bug, but now you know ^^.

Spoiler

[00:08:34]: amulet    1    
[00:08:34]: armorwood    7    
[00:08:34]: attunable_classified    1    
[00:08:34]: axe    1    
[00:08:34]: backpack    14    
[00:08:34]: bandage    1    
[00:08:34]: batbat    1    
[00:08:34]: beardhair    1    
[00:08:34]: bedroll_straw    1    
[00:08:34]: beefalohat    1    
[00:08:34]: beefalowool    3    
[00:08:34]: beemine    1    
[00:08:34]: bird_egg    2    
[00:08:34]: birdcage    2    
[00:08:34]: blowdart_pipe    1    
[00:08:34]: boards    1    
[00:08:34]: boneshard    1    
[00:08:34]: bugnet    1    
[00:08:34]: bunnyman    1    
[00:08:34]: cane    3    
[00:08:34]: carrot_planted    2    
[00:08:34]: charcoal    1    
[00:08:34]: chester    1    
[00:08:34]: chester_eyebone    1    
[00:08:34]: chesterlight    1    
[00:08:34]: container_classified    1    
[00:08:34]: cookpot    13    
[00:08:34]: cutgrass    2    
[00:08:34]: cutreeds    1    
[00:08:34]: deciduoustree    130    
[00:08:34]: dragon_scales    1    
[00:08:34]: dragonflychest    3    
[00:08:34]: evergreen    28    
[00:08:34]: evergreen_sparse    3    
[00:08:34]: eyebrellahat    1    
[00:08:34]: feather_crow    1    
[00:08:34]: featherfan    1    
[00:08:34]: fertilizer    1    
[00:08:34]: fireflies    1    
[00:08:34]: firepit    1    
[00:08:34]: firestaff    1    
[00:08:34]: flies    5    
[00:08:34]: flint    2    
[00:08:34]: flower    61    
[00:08:34]: focalpoint    1    
[00:08:34]: footballhat    4    
[00:08:34]: forest_network    1    
[00:08:34]: gears    2    
[00:08:34]: glommer    1    
[00:08:34]: glommerflower    2    
[00:08:34]: goldenpickaxe    2    
[00:08:34]: goldenshovel    1    
[00:08:34]: goldnugget    2    
[00:08:34]: grass    177    
[00:08:34]: hambat    1    
[00:08:34]: hammer    1    
[00:08:34]: heatrocklight    3    
[00:08:34]: honeyham    1    
[00:08:34]: houndstooth    1    
[00:08:34]: ice_puddle    10    
[00:08:34]: ice_splash    10    
[00:08:34]: icebox    4    
[00:08:34]: inventory_classified    1    
[00:08:34]: inventoryitem_classified    29    
[00:08:34]: koalefant_summer    4    
[00:08:34]: koalefant_winter    4    
[00:08:34]: krampus_sack    1    
[00:08:34]: lantern    1    
[00:08:34]: lightning_rod    4    
[00:08:34]: livinglog    1    
[00:08:34]: log    2    
[00:08:34]: marble    1    
[00:08:34]: meatrack    46    
[00:08:34]: minerhat    2    
[00:08:34]: minimap    1    
[00:08:34]: mist    1    
[00:08:34]: molehat    1    
[00:08:34]: mosquitosack    1    
[00:08:34]: nightmarefuel    1    
[00:08:34]: nightsword    1    
[00:08:34]: nitre    1    
[00:08:34]: papyrus    1    
[00:08:34]: penguin_ice    2    
[00:08:34]: petals_evil    1    
[00:08:34]: pickaxe    1    
[00:08:34]: pinecone    1    
[00:08:34]: pitchfork    2    
[00:08:34]: plant_normal    4    
[00:08:34]: player_classified    1    
[00:08:34]: pollen    1    
[00:08:34]: poop    6    
[00:08:34]: pottedfern    4    
[00:08:34]: purpleamulet    1    
[00:08:34]: rabbit    1    
[00:08:34]: rabbithole    6    
[00:08:34]: rabbithouse    2    
[00:08:34]: rain    1    
[00:08:34]: rainometer    1    
[00:08:34]: redgem    1    
[00:08:34]: reflectivevest    1    
[00:08:34]: researchlab    1    
[00:08:34]: researchlab2    1    
[00:08:34]: researchlab3    1    
[00:08:34]: resurrectionstatue    2    
[00:08:34]: robin    1    
[00:08:34]: rock1    1    
[00:08:34]: rock2    3    
[00:08:34]: rock_ice    10    
[00:08:34]: rocks    56    
[00:08:34]: rope    1    
[00:08:34]: sapling    1    
[00:08:34]: seeds    7    
[00:08:34]: sewing_kit    2    
[00:08:34]: shovel    1    
[00:08:34]: siestahut    1    
[00:08:34]: signleft    4    
[00:08:34]: silk    1    
[00:08:34]: slow_farmplot    4    
[00:08:34]: snow    1    
[00:08:34]: spawnlight_multiplayer    1    
[00:08:34]: spear    3    
[00:08:34]: spidergland    2    
[00:08:34]: spiderhat    1    
[00:08:34]: spoiled_food    1    
[00:08:34]: stick    8    
[00:08:34]: stickleft    8    
[00:08:34]: stickright    12    
[00:08:34]: stinger    1    
[00:08:34]: tallbirdegg    7    
[00:08:34]: telestaff    1    
[00:08:34]: tent    1    
[00:08:34]: tentaclespike    43    
[00:08:34]: torch    4    
[00:08:34]: trap    16    
[00:08:34]: trap_teeth    14    
[00:08:34]: treasurechest    76    
[00:08:34]: trinket_12    1    
[00:08:34]: trinket_14    1    
[00:08:34]: trinket_3    1    
[00:08:34]: trinket_4    6    
[00:08:34]: turf_carpetfloor    1    
[00:08:34]: turf_forest    1    
[00:08:34]: turf_grass    1    
[00:08:34]: turf_marsh    1    
[00:08:34]: turf_rocky    1    
[00:08:34]: turf_savanna    1    
[00:08:34]: turf_sinkhole    1    
[00:08:34]: twigs    2    
[00:08:34]: umbrella    1    
[00:08:34]: wall_hay    15    
[00:08:34]: wall_stone    963    
[00:08:34]: wall_wood    197    
[00:08:34]: wall_wood_item    1    
[00:08:34]: walrus_tusk    1    
[00:08:34]: walrushat    1    
[00:08:34]: wardrobe    1    
[00:08:34]: winterhat    1    
[00:08:34]: winterometer    1    
[00:08:34]: world    1    
[00:08:34]: wormhole    1    
[00:08:34]: wx78    1    
[00:08:34]: There are 161 different prefabs in the world, 2174 total (and 1076 unknown)   

 

3 - fps with wall on map.png

It kinda looks to me like your issue is that you've got over 1000 wall pieces laid down. @_@ That's not a trivial number, and maybe it's just a bit more than your GPU can handle without some issue.

Oh, what about the map? You have a mod for extra map icons. How is map data handled memory-wise?

@Onirian It looks like the main increase was due to the farm decor, still. I'm guessing it still doesn't despawn, although the server copies are no longer networked. Those alone account for 648 entities. I also see a large increase in the number of logs (2->117). DarkXero said that during testing spawning 2000 logs/evergreens had a large impact, while spawning 2000 stone walls or stones had very little. I couldn't figure out what would be different enough between them to cause that though... unless it's just the size of the texture or something? But looking at the anim files logs are 4kb and rocks are 6kb, so I guess that's not it.

@TheHalcyonOne The map is a pretty big drain, but only when it's open. Earlier Onirian was noting that opening the map dropped frames, but was doing all of his testing with the map closed. You can see this really clearly with the Minimap HUD mod, for example, if you have explored much of the world you can see a very noticeable difference just toggling the minimap being open. (I would hope that this is also an avenue for optimization that Klei is pursuing... but as it's handled all C++-side, I have no knowledge of how complicated/feasible that is)

I have installed this mod for the map only to show how many walls I have in my camp (a lot ^^), but usually, I play without it.

Desactivating all my mods (server and client) doen't change anything (according to the fact I do not play with mod which have a visible impact on framerate, like "Minimap HUD" or "Global Positions".

@TheHalcyonOne : my pc configuration is pretty good. I can run most of the recent AAA games with high graphics level without any problem (Things like Assassin's creed for example). 1000 walls... It is very small in comparison. The problem doesn't come from the hardware.

So...

  • maybe there is possible optimisation for log/evergreen in c++ side.
  • maybe there is possible optimisation again for farms.
  • maybe there is possible optimisation in the communication protocol between client and server.
  • maybe there is possible optimisation that only Klei can see with their debug tools.

But all of this thing requires Klei. And Klei seems to consider that it's more important to add "card" in steam, out of the game, than to allow their lovely players to play long games (Oh, I still love you Klei ^^, it's true ! But seriously, I can't imagine you haven't see aalllllll my messages about this lag problem, and you never takes times to aswer me and say : "Oh yes, it's a known problem, we are working on it, xoxo")

Well... It seems I will play (or stop playing, if the lag continues to grow while my base is growing too) a long time with horrible framerate.

Thank you a lot, @rezecib and @DarkXero. If you have any other ideas, I'm still here ^^.

ps : Oh, and each time a people will post about lag (And it will happen, because it's a MAJOR problem, even if it's hard to fix and require lot of investment), I will continue to relay it in my "hopefull, vibrant and strong call to Klei. (at the begening I said I was a boring guy, and sometimes, I tell the truth ;-p).

 

On 6/18/2016 at 9:37 PM, rezecib said:

DarkXero said that during testing spawning 2000 logs/evergreens had a large impact, while spawning 2000 stone walls or stones had very little.

I am really curious what this issue is too.  What does a log do differently than a stone wall?  (or was it just farmrocks?) Is it something with burning?  Ability to be picked up?  Hauntability?  Something in there seems like it is being constantly updated unnecessarily when it is just a humble log sitting on the ground.  

1 hour ago, calculuschild said:

(...)  when it is just a humble log sitting on the ground.  

Love this expression, the humble log sitting on the ground ^^.

And I also think there is a problem here, maybe not related with network. In Don't Starve (not together), there is a glitch to plant a lot of tree at the same place. If you plant to much of them at the same place, the game (and it's only local, of course) begin to lag a lot when the player is near this place, and it's not sooo much trees (I don't remember exactly, and it needs probably some tests to confirm, but from my memory, 500 is largely enough to create the problem).

4 hours ago, calculuschild said:

What does a log do differently than a stone wall?  (or was it just farmrocks?)

When I said "stones", I meant literally rocks, the kind you pick up. So for him there was a noticeable difference between rocks and logs, which seem pretty much functionally identical to me. But I tested in-game now and didn't see any difference between 2k rocks and 2k logs, even as a client-host. Both dropped me to about 30 frames.

But interestingly, it did only take me 2k logs to drop to 30 frames as a client (with a surface+caves server), but as an in-client server, it tooks 4k logs. That might just be the strain of running two servers + a client, but it looks like I had enough free CPU to give them each a full core.

@Onirian There is also a command, TheSim:Profile(), which will save a file next to the log, profile.json. This has some information about updates, which you can open by going to the url chrome://tracing. It's still a bit hard to understand what you're looking at, but if you upload it maybe one of us can spot something interesting by comparing yours with a "normal" well-performing run.

Oh json. That is human readable (even if it need a little format to read it easyly). 

I will do this log tomorrow. 

What does this file contains exactly? All thing passed threw the network or... Somethings with less information than that ? 

And... Maybe... Is there any doc I can read about debug commands in dst ? 

edit : I found a wiki page here, I will read it tomorrow too. 

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...