Project Hospital
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Lyana
medic
Posts : 2
Reputation : 0
Join date : 2021-10-04

Lag spike every couple of seconds Empty Lag spike every couple of seconds

Mon Oct 04, 2021 10:49 pm
As posted in the steam forum:

I'm experiencing lag spikes in this game. It happens all the time, with or without mods, fresh install, game paused... I can even see it in the main menu, when I look at one of characters moving, it kind of freezes for a fraction of a second and then continues. While playing it's quite annoying, even in a small clinic.

It kind of reminds me of a similar problem in another game called Rimworld. It was quite an issue a while ago until some performance update. As I understand the problem was with unity and its garbage collector. Each time it empties itself, the game freezes for a moment.

It was requested that I upload a log file here.

I have one thing to add. I just built a intensive care department and after unpausing the game, the lag spike changed. It's no longer one single spike, but more of a stutter of about half a second long. It happens just as often as the spike before.

These are my specs:
Windows 7 64 bit
Intel Xeon CPU E3-1231 v3 @ 3.40 GHz
16 GB RAM
NVidia GeForce GTX 970
Resolution: 3440 x 1440
Attachments
Lag spike every couple of seconds Attachment
output_log.txt You don't have permission to download attachments.(204 Kb) Downloaded 5 times
jan.oxymoron
jan.oxymoron
developer
Posts : 2194
Reputation : 314
Join date : 2018-03-23

Lag spike every couple of seconds Empty Re: Lag spike every couple of seconds

Tue Oct 05, 2021 10:56 am
Hi, thanks for the report and welcome to the forum!

According to what you describe it looks like yes, we're talking about the memory garbage collection taking place - and while it's bound to be present in any complex game built with Unity, it surprises me you're seeing it this often. Having quickly checked in the current Steam version and a relatively big hospital, it should be much (5-10 times?) less frequent.

It's probably worth mentioning that we did a round of memory optimizations a few patches ago, taking care of most of the easy-to-fix cases of inefficient memory use and resulting in a noticeable improvement.

Looking at the log, I don't see anything going obviously wrong, but there's also close to 20 mods installed - especially when playing wit graphical mods, the overall memory consumption can easily double, which will also have a big impact on this behavior. Still, to be sure: do you think you could upload a log file after a longer game session? Maybe there's a hidden issue/error message that could explain the increased frequency and that we could fix in a future update.

A couple of general tips:
- Running the game with V-sync on (can be selected under Quality in the launcher window) to limit frame rate can help
- The game autosaves at 8 am, 8 pm and generates new patients at midnight, these will also manifest as spikes. The autosave can be disabled in options if needed.
avatar
Lyana
medic
Posts : 2
Reputation : 0
Join date : 2021-10-04

Lag spike every couple of seconds Empty Re: Lag spike every couple of seconds

Tue Oct 05, 2021 3:11 pm
Hi. Thanks for the response.
I don't think the mods are to blame in this. I already tried a new game, without any mods (unsubscribed all), biggest map with a prebuilt hospital. I get those lag spikes immediatly.
Maybe it has something to do with the amount of objects on the map? That when it reaches a certain amount, memory problems start occurring and I get those lag spikes. That could explain the lack of lag in an early game with an empty map start.

Fortunately that stutter I saw yesterday, was only temporary. It disappeared after a short while and now I only have the lag spike.

I already tried running the game with or without Vsync, and without is definitely worse.
I'll disable the autosaves entirely to see if that has any effect.
And I'll try to do a longer session and upload the log from that.

stratojano33 likes this post

avatar
8or8tion
intern
Posts : 6
Reputation : 0
Join date : 2021-09-25

Lag spike every couple of seconds Empty Re: Lag spike every couple of seconds

Sun Oct 10, 2021 6:37 am
Have you tried checking task manager to see if there is a system bottleneck? It could be any one of CPU, disk, graphics or memory.
Sponsored content

Lag spike every couple of seconds Empty Re: Lag spike every couple of seconds

Back to top
Permissions in this forum:
You cannot reply to topics in this forum