Cataclysm-dda: Sleeping should be faster.

Created on 13 Sep 2020  Â·  9Comments  Â·  Source: CleverRaven/Cataclysm-DDA

Describe the bug

Sleeping should be fast in game, because right now it's taking way too long, like i've discussed in the discord it took almost 18 minutes in real life just to the character wake up after being put to sleep it's actually way too much to just wait.

Steps To Reproduce

  1. Load the save.
  2. Put the character to sleep.
  3. Wait, I really mean to wait.

Expected behavior

took at least 1 to 4 minutes at most.

Versions and configuration

  • OS: Windows 7
  • Game Version: 0.E-5882-g98879b8 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [Dark Days Ahead [dda],Disable NPC Needs [no_npc_food],Stats Through Skills [StatsThroughSkills]]

Additional context

Again the save when i was about to sleep.
Shady_Side.zip

Performance [C++]

Most helpful comment

On my 2016 macbook pro with some of the latest optimizations it takes ≈16 RL seconds per 30 in-game minutes. So 8 hour sleep would be ≈ 4 minutes IRL.

Here's the overview:
image

Here is the expanded view (with small % times filtered out):
image

So, major dominators here are:

28.69 s   52.0% 23.00 ms         game::monmove()
12.49 s   22.6% 125.00 ms        map::process_items()

All 9 comments

Too nonspecific to address. We're working on performance and we don't need people reminding us of that without any additional details.

My bad, I was reading issues on my phone and didn't see the attached save.

On my 2016 macbook pro with some of the latest optimizations it takes ≈16 RL seconds per 30 in-game minutes. So 8 hour sleep would be ≈ 4 minutes IRL.

Here's the overview:
image

Here is the expanded view (with small % times filtered out):
image

So, major dominators here are:

28.69 s   52.0% 23.00 ms         game::monmove()
12.49 s   22.6% 125.00 ms        map::process_items()

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.

Worth noting that since my previous measurement performance on this particular savefile improved by ≈25%.

Previously one in-game hour was taking ≈32 seconds, currently it's ≈24 seconds.

Here is a save file which I believe exhibits the same behavior. I am near a lab in the save, but the issue has been happening when not near a lab. It took 5 minutes to sleep through the night. I used to play on stable versions and the change from stable to experimental was jarring for wait times.
save.zip

Version.txt content:
Platform : Windows
Graphics : Tiles
Build number : #11106
Build version: 0.E-6961-g7ff5d41
Major version: 0.E

@MerMerMerMer, I finally got to profile your save.
First thing to note, you're positioned above the lab and labs are notoriously slow, especially for monster simulation.

On my laptop waiting 6 hours results ≈16.5s / in-game hour on the (somewhat) current game version.
Here are profiling details:
image

The good news are that we have some performance improvement planned (some of them mine, some from other people, like #45026) that together bring the simulation down to 9.6s / in-game hour (on the same savefile, on my laptop). That's more than 40% improvement in simulation time. But it would be progressively harder to improve from there.

Oh I have plans for monmove()...

On Fri, Oct 23, 2020, 2:21 PM Ivan Zaitsev notifications@github.com wrote:

@MerMerMerMer https://github.com/MerMerMerMer, I finally got to profile
your save.
First thing to note, you're positioned above the lab and labs are
notoriously slow, especially for monster simulation.

On my laptop waiting 6 hours results ≈16.5s / in-game hour in the
(somewhat) current game version.
Here are profiling details:
[image: image]
https://user-images.githubusercontent.com/2865203/97052905-b9874780-1536-11eb-9bcd-3618648e8e03.png

The good news are that we have some performance improvement planned (some
of them mine, some from other people, like #45026
https://github.com/CleverRaven/Cataclysm-DDA/pull/45026) that together
bring the simulation down to 9.6s / in-game hour (on the same savefile, on
my laptop). That's more than 40% improvement in simulation time. But it
would be progressively harder to improve from there.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/CleverRaven/Cataclysm-DDA/issues/44157#issuecomment-715595953,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGSA5C5COZ6GJXQ5DUJXNDSMHXXBANCNFSM4RKY22TA
.

So, with #45346 the original savefile is down to 11.2 s/hour:
image

Was this page helpful?
0 / 5 - 0 ratings