Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/obsolete until fixing meat overgrown labs because of fps killer #71349

Closed
KHeket opened this issue Jan 29, 2024 · 16 comments · Fixed by #74663
Closed

Fix/obsolete until fixing meat overgrown labs because of fps killer #71349

KHeket opened this issue Jan 29, 2024 · 16 comments · Fixed by #74663
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@KHeket
Copy link
Contributor

KHeket commented Jan 29, 2024

Describe the bug

#68593 added the meat labs, but because of tons of amalgams and breathers, which spawning overtime little breathers again and again, and, maybe, I don't know, there can be other fps killing factors, but its impossible to comfortably go through this labs and also impossible to walk at the surface, when this kind of lab is under you, because game became ultra slow, I didn't ever see more laggy place than this kind of labs, and meat labs also are few(2/3/4) time laggy, than most lagging labs, I had lesser lags with TCL facilitys full filed with blobs

Attach save file

n/a

Steps to reproduce

Reveal map, teleport to labs, find meat lab, try to wait inside or at surface of this lab for few minutes, or just walk at the surface - see the turtle speed of the game

Expected behavior

Don't have anomaly fps slowing zones in the game

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.3930 (22H2)
  • Game Version: 56c9082 [64-bit]
  • Graphics Version: Tiles
  • Game Language: Русский <color_dark_gray>(92,2%) [ru]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

Additional context

No response

@KHeket KHeket added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jan 29, 2024
@Nebnis
Copy link
Contributor

Nebnis commented Jan 30, 2024

Until the game can handle this kind of design, i feel breathers and slimes do more harm than good to this game. Their ability to multiply needs to be throttled somehow, like never more than a bunch.

@ZhilkinSerg
Copy link
Contributor

Do you have a savegame with that lab below?

@KHeket
Copy link
Contributor Author

KHeket commented Feb 2, 2024

Do you have a savegame with that lab below?

Sure
Here is just full save with character in meat lab, you can try to wait 5 minutes and see performance death
test1.zip
Here is debug minimized archive of the same character in the lab
test-trimmed.tar.gz

@ZhilkinSerg
Copy link
Contributor

We should try to make these monsters blind

image

@Nebnis
Copy link
Contributor

Nebnis commented Feb 2, 2024

Would making them check for noises be better cpu wise? And blind

Copy link
Contributor

github-actions bot commented Mar 3, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label Mar 3, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@John-Candlebury
Copy link
Member

Want to mention that breathers are already blind, if they are processing vision info theres another underlaying bug here.

@github-actions github-actions bot removed the stale Closed for lack of activity, but still valid. label Apr 14, 2024
@ZhilkinSerg
Copy link
Contributor

Actually there is no check for monster flag SEES in sees function.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label May 15, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
@Maleclypse Maleclypse reopened this Jun 16, 2024
@Maleclypse Maleclypse added (S2 - Confirmed) Bug that's been confirmed to exist [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility stale Closed for lack of activity, but still valid. labels Jun 16, 2024
@Maleclypse
Copy link
Member

@akrieger this looks like the kind of thing you might be interested in. If not my apologies.

@akrieger
Copy link
Member

I don't know what hope there is here. There's hundreds of breathers, which are not friendly to swarmers and other enemies in the lab which can see. The monster planning logic doesn't have the ability to intelligently sort monsters by distance (or at least, doesn't yet), and all the time spent in monster::sees is spent accessing the LRU cache to check point to point visibility (which is going to be swarmers * breathers large, which is... a lot). Even raising the limit on the seen cache doesn't help because there's just so many checks happening and each check is relatively expensive (map lookup and list splice combined).

@kevingranade
Copy link
Member

Hrm, possibly add some firewalls between areas? If they have walls/doors between them #68097 should keep them from having to check for reachability constantly.
I've tried to figure out sorting by distance several times, but the problem is perversely when a monster is in a room where it can't see anything but has a path to them, in which case it will check closest first, but still end up checking everything, so the sorting ends up being pure overhead.

@kevingranade
Copy link
Member

Just checked with Candlebury and there's no real reason that the breathers should be antagonistic to the other creatures, so we can probably just shuffle around some factions (with a variant breather if nothing else?).

@kevingranade
Copy link
Member

Yea confirmed in perf
Screenshot from 2024-06-18 16-24-40
Looking at changing factions so they aren't hostile to each other.

@akrieger
Copy link
Member

It'll help by like, 1/3, which is a lot but it's still pretty darn slow.

@kevingranade
Copy link
Member

kevingranade commented Jun 19, 2024

Yea testing bore out your prediction, so I cut the number of breathers that spawn in there pretty drastically too, resulting in it being fairly snappy:
Screenshot from 2024-06-18 18-17-06
Honestly it's still a bit sluggish, and I didn't chase down who's doing so much route() invocation in there, that's pretty bad, but I'm trying to get this hammered down without it spreading out over multiple days or something so I'm going to call it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants