Ok, so I found two obvious sources of slowness.
On the game thread, you are spending about 1.4ms inside of the logic of a button widget Blueprint. I’m not sure exactly what it’s doing, but it seems like an unreasonable amount of time to spend working on a button.
Of course, that won’t dramatically impact your rendering performance, but it’s good to reduce whatever you can in the game thread.
Next, and most importantly, is your rendering thread:
It is spending the majority of its time in InitViews – which almost always indicates calculations spent on view relevance and more fine-grained occlusion culling.
So my guess is that you have a large number of objects in your scene (around 2000?) and that the engine is having a hard time doing occlusion culling on them.
One thing you can try is toggling on or off HZB occlusion culling and see if it changes the performance profile. For some scenes it will make it worse, for others it will make it better. It defaults to enabled. You can disable it with:
r.HZBOcclusion 0
Or you can use 1 to enable it.
But if your scene in general is just really hard to cull, you’ll have to change other things. Mark your meshes that don’t move as static instead of movable. Combine meshes that don’t move relative to each other as single meshes. (Don’t build large complex buildings out of single panel static mesh actors, for example – build the whole structure in your modeling tool separately.) If you have many copies of the same mesh, consider using Instanced Static Mesh component instead of regular static mesh component.
You can try making your scene easier to cull by blocking off stuff that you don’t need to see with large simple meshes. You can use distance-based culling and LOD to reduce or remove stuff at a distance.
You can also take more extreme measures. You can try using pre-computed visibility, though this is typically only used for mobile platforms that can’t spend much CPU time on the dynamic occlusion that UE4 uses by default. You’ll have to place visibility/occlusion volumes into your scene yourself, and then run the build visibility action from the Build button/menu.
In the very worst case, where you know everything in your scene definitely always needs to be visible and there are large numbers of objects, you can just turn off occlusion culling entirely in the project preferences. It means that you will potentially spend much more time drawing and rendering stuff, but if you know it’s always going to be visible anyway, then you save time by not bothering to do occlusion culling.