Killing Floor UnrealScript Profiling - PROFILESCRIPT and .uprof Files

Killing Floor UnrealScript Profiling - PROFILESCRIPT and .uprof Files

  • Topic closed
  • You cannot reply to this topic

Killing Floor UnrealScript Profiling - PROFILESCRIPT and .uprof Files How to profile Killing Floor UnrealScript performance with PROFILESCRIPT START/STOP, .uprof output, call graph, expensive functions, and inclusive/exclusive time.

Geekrainian #1

    • Group: Admin
    • Posts: 974

    Posted:

    Killing Floor UnrealScript Profiling

    UnrealScript performance problems can be hard to understand by reading code alone. The script profiler helps identify which functions consume time, where spikes happen, and which calls matter during gameplay.

    Creating A Profile

    Start profiling from the console:

    PROFILESCRIPT START

    Stop profiling:

    PROFILESCRIPT STOP

    Stopping creates a file in KillingFloor\System with a timestamp-style name:

    KillingFloor-<Current ISO Date>.uprof

    Open the .uprof file in the profiler visualizer.

    Call Graph

    The call graph shows script calls as a tree. Inclusive time includes children; self time shows the function’s own cost when it is not a leaf.

    This is useful when a cheap-looking function is actually expensive because it calls several heavy child functions.

    Expensive Functions

    The expensive-functions view helps find worst-case calls. A function that takes 10 ms once every 100 frames may not look huge in averages, but it can still cause visible gameplay spikes.

    Use this view when players report stutters, Zed spawn spikes, heavy HUD updates, or expensive mutator logic.

    Inclusive And Exclusive Time

    The inclusive/exclusive view lists:

    • call count;
    • inclusive percentage;
    • exclusive percentage;
    • inclusive time per call;
    • exclusive time per call.

    Times are measured in microseconds.

    How The Profiler Works

    The profiler records function pointers and timing data on entry and return. A separate C# visualizer parses the stream and reconstructs the call graph.

    The result is more useful than guessing from code structure because it reflects what actually ran during the captured session.

    Practical Workflow

    1. Reproduce the gameplay scenario that feels slow.
    2. Start profiling shortly before the suspicious moment.
    3. Stop profiling right after the spike or test segment.
    4. Open the .uprof file.
    5. Check expensive functions first.
    6. Drill down through the call graph.
    7. Optimize, compile, and capture again.
    Back