Tutorial Check Fps, Draw Frame Ms And Memory Usage For Better Performance

Discussion in 'PC Editor Discussion' started by RobertSchulz, Feb 27, 2024.

  1. RobertSchulz

    RobertSchulz Well-Known Member

    Joined:
    Oct 10, 2023
    Messages:
    1,863
    Likes Received:
    2,607
    So one problem I stumbled upon when dealing with painting my landscape with vegetation and increasing the density of grass was that the performance went really bad and the frame rate dropped by a lot.

    Since players of our routes should not have any performance issues, it's wisely to build your landscape while having an eye on its impact at performance.

    And here are two things you can do to monitor it.

    Quick tip before: Fly over the tracks and monitor the impact on each location of your route. Just a few meters of difference can show you a big "drop point". Important: the FPS value is dependent on the current view, which means it's influenced by all the vegetation and other actors which are faced by the current point of view (even the ones which are far away in the distance).

    1. Option:
    Go to Viewport Menu and tick the option "Show FPS" (alternatively select the viewport and use the shortcut Ctrl+Shift+H):
    Screenshot (10027).png

    This will bring you a nice handy monitor of the current FPS value and the milliseconds it needs to draw a single frame directly into the the viewport. Keep holding these values in the green area (above 30 FPS). Yellow area (between 20 and 30 FPS) is your choice what to do but consider alter something, but if the values frequently go down or even persist in the red zone (below 20 FPS) like illustrated in the picture -> Change your landscape!

    Keep in mind that you need some more FPS once trains are running on your route!

    Screenshot (10018).png


    2. Option:
    Go to Edit -> Editor Preferences -> General -> Performance and tick the option "Show Frame Rate and Memory".
    Screenshot (10025).png

    When you enable this option you will get the informations about the FPS (Frames per second), the milliseconds it needs to draw one frame, the current memory usage and I guess the amount of objects currently in memory at the top right corner in the Editor's User interface:
    Screenshot (10026).png

    Edit: Found this additional explanation of the FPS, memory and objects values in this article:

    Frame Rate & Frame Time
    The Frame Rate and Frame Time statistic covers the current editor frames per second and the time is takes to render a single frame. These are the two same stats that are available when using the stat fps console command.

    Memory Usage
    The Memory statistic displays the amount of RAM the opened Unreal Engine editor is currently taking.

    Object Count
    The Object statistic displays the total number of object that have been claimed by the editor. This is the total size of the global object array minus the number of available object array elements.

    It’s important to know that this isn’t just the objects within the loaded level, but the editor as a whole. For example, a blank level wouldn’t lead to having zero objects claimed.
     
    Last edited: Feb 28, 2024
    • Helpful Helpful x 6
  2. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    1,036
    Likes Received:
    1,049
    On the topic of profiling, I would also bring up the "stat unit" and then "stat unitgraph" commands, this will bring up a graph with frame times and allows you to see spikes pretty easily.

    Then there's "profileGPU", which takes a snapshot of the scene, breaks down the frame time into individual components and allows you to see what is eating up performance. Though the explanation of each section is quite tricky and technical so I would suggest looking at a relevant part of this video.


    "stat gpu" is basically a quick realtime version of that which still might be pretty useful.
     
    • Helpful Helpful x 2

Share This Page