Replay System Performance Decrease in UE4

Hello Unreal Community,

We have been working with the Replay System Unreal provides for a while now in both 4.21 and then in 4.22 after upgrading (the Replay System we use: Using the Replay System in Unreal Engine | Unreal Engine 5.1 Documentation).

After the upgrade last week, many issues with the Replay System were fixed and game play was smoothest as ever. We were very pleased with the upgrade at first.

But suddenly, after working with 4.22 for a while, in-game FPS suddenly dropped to less than 60 FPS (before it was around 100~120). The FPS drop happens immediately after starting to record using the Replay System. The 40~50 FPS drop is critical to the overall performance of our game.

We tried the following:

  • Restart the Computer.
  • Rollback to a last version of our game using 4.21
  • Rollback to the first version of our game using 4.22 were game play was smoothest as ever
  • Update drivers (GPU, etc)
  • Update Windows
  • Verify Engine 4.22

Nothing seemed to solve the problem for 4.22. We realized the following after a few more tests:

  • This big drop does not happen in 4.21 (FPS drops by 3~5 FPS only)
  • This big drop does occur in the first version of our game using 4.22 (when originally it was the smoothest and highest FPS game play we ever had).
  • We usually use Unreal in EPIC quality. But even after lowering the quality to LOW, this same 40~50 FPS drop still occurs in 4.22.
  • Everybody’s computer started having this issue when we all came in on Monday this week (15th of July)

Without the Replay System in 4.22, the FPS is back up to the usual rate. But the Replay System is core to our game and to this point, we have no idea why this has happened. This issue started to appear at the same time to everybody when we came in for work on Monday this week (15th of July).

Any ideas will be greatly appreciated!

We deleted UE 4.22 and installed it again. The FPS before the Replay Starts is 144 FPS (can be more but we capped it at 144). Once the replay starts, the FPS drops to 30~50 FPS which makes it about a 100 FPS drop.
Regardless of the initial FPS, the FPS always seems to drop to that level.

Do you see the same performance drops in a build or is it only in-editor (if you’ve not tried it in a build, you should).

Have you tried profiling to see what the performance drop is? Have a look at ProfileCPU to see if it gives you any idea of where your performance is suffering. It might be something in your own code / blueprints that’s fixable.

Thanks for your quick response!

I forgot to mention that we did package the game and there seemed to be no performance drop except in one computer (I guess that computer has issues that we can fix!).

I did try profiling (stat Game) and noticed that the “TickableGameObjects Time” goes up to 30.00 ms, causing the whole gameplay to go down 30 FPS or lower.

The issue is, I only disable one blueprint function called “Start Recording Replay from BP”, which is just a function from the Game Instance that calls the C++ function UGameInstance::StartRecordingReplay(…). See images below. Once I disable this one function only, which is called through the Begin Play for our controlled Pawn, the FPS drop never occurs.

Since the Replay System of Unreal relies on replication, I also tried disabling replication for all variables that were replicating and still no luck.

We appreciate your response and we are looking forward for any other ideas you and the rest of the Unreal Community might have about this!

Hello Unreal Community,

We have been doing a lot of tests and have finally found a workaround about this issue (although not really one we like so much).

We realized that having any project (even a basic template one) on an HDD Drive caused the game to drop to 30 FPS when the Replay System started. However, on an SSD drive, the FPS would only fall about 3~5 FPS and stay above 110 FPS.

We confirm this to be the reason since in Replay time, Replay Files are being made under “Saved/Demo” (which in Editor builds will be under the Project Directory i.e. under the HDD drive in our case).

We are also worried of FPS drops for those people that get our Game and do not have an SSD (i.e. the Saved folder in App Data will be in an HDD).

This issue does NOT happen in UE 4.21, as we had for a long time been using our HDDs to store our project (since the project can get really big since we also use GIT).

We think this is an issue with Unreal Engine 4.22 way of handling read/write while replaying.

This performance decrease is a bug in 4.22. This was apparently fixed in 4.23.
See more here: Unreal Engine Issues and Bug Tracker (UE-75528)