Skip to main content

Overview

Parsing Fortnite replays can be resource-intensive, especially for large matches or when processing multiple files. This guide covers techniques to optimize parsing performance through parse type selection, settings configuration, and advanced control methods.

Parse Type Selection

The most impactful optimization is choosing the appropriate ParseType for your needs.

Parse Type Performance Comparison

EventsOnly

Fastest - Parses only eventsUse when you only need:
  • Eliminations
  • Match stats
  • Team stats

Minimal

Very Fast - Events + basic game stateUse when you need:
  • Events
  • Player names and IDs
  • Team information

Normal

Moderate - Events + full game stateUse when you need:
  • Everything above
  • Player locations
  • Inventory tracking

Full

Slow - Everything availableUse when you need:
  • Complete match data
  • All tracking enabled

Parse Type Usage Examples

// Fastest - only parse events
var reader = new ReplayReader();
var replay = reader.ReadReplay(file, ParseType.EventsOnly);

// Available data:
var eliminations = replay.Eliminations;
var stats = replay.Stats;
var teamStats = replay.TeamStats;

// NOT available:
// - Player locations
// - Inventory data
// - Health tracking

Settings Optimization

Configure FortniteReplaySettings to skip unnecessary data processing.

Performance-Focused Presets

var settings = new FortniteReplaySettings
{
    PlayerLocationType = LocationTypes.None,
    IgnoreHealth = true,
    IgnoreContainers = true,
    IgnoreShots = true,
    IgnoreInventory = true,
    IgnoreFloorLoot = true,
    IgnoreWeaponSwitches = true
};

var reader = new ReplayReader(null, settings);
var replay = reader.ReadReplay(file, ParseType.Minimal);
Performance Gain: 50-70% faster than defaultBest For:
  • Elimination tracking
  • Leaderboard generation
  • Match statistics
var settings = new FortniteReplaySettings
{
    PlayerLocationType = LocationTypes.User,
    LocationChangeDeltaMS = 1000,  // 1 second intervals
    IgnoreFloorLoot = true,
    IgnoreContainers = true,
    IgnoreWeaponSwitches = true
};

var reader = new ReplayReader(null, settings);
var replay = reader.ReadReplay(file, ParseType.Normal);
Performance Gain: 30-40% faster than defaultBest For:
  • Personal stats tracking
  • Performance analysis
  • Most common use cases
var settings = new FortniteReplaySettings
{
    PlayerLocationType = LocationTypes.Team,
    LocationChangeDeltaMS = 500,
    IgnoreFloorLoot = true,
    IgnoreContainers = true
};

var reader = new ReplayReader(null, settings);
var replay = reader.ReadReplay(file, ParseType.Full);
Performance Gain: 20-30% faster than defaultBest For:
  • Team coordination analysis
  • Squad performance tracking

Location Tracking Optimization

Location tracking is one of the most expensive operations:
// Skip all location tracking
PlayerLocationType = LocationTypes.None

// Performance: 🚀 30-50% faster
// Data loss: All player movement

Location Delta Optimization

Reduce location frequency to minimize data volume:
// Capture every location update (most data, slowest)
LocationChangeDeltaMS = 0

// Capture every second (good balance)
LocationChangeDeltaMS = 1000

// Capture every 5 seconds (minimal data, fastest)
LocationChangeDeltaMS = 5000
For most use cases, LocationChangeDeltaMS = 1000 provides sufficient accuracy with significant performance improvement.

Advanced: Granular Parse Control

For fine-grained control, use the SetParseType method to configure parsing for specific groups:
var reader = new ReplayReader();

// Configure specific parsing groups
reader.SetParseType(ParsingGroup.PlayerPawn, ParseType.Normal);

// Then read the replay
var replay = reader.ReadReplay(file, ParseType.Minimal);

Available Parsing Groups

ParsingGroup.PlayerPawn
ParsingGroup
Controls parsing of:
  • Player locations (PlayerPawnC)
  • Bot locations (inherited types)
  • Vehicle locations (BaseVehicle)

Example: Location-Only Parsing

var settings = new FortniteReplaySettings
{
    PlayerLocationType = LocationTypes.All,
    IgnoreHealth = true,
    IgnoreShots = true,
    IgnoreInventory = true,
    IgnoreFloorLoot = true,
    IgnoreContainers = true
};

var reader = new ReplayReader(null, settings);

// Parse player pawns for locations
reader.SetParseType(ParsingGroup.PlayerPawn, ParseType.Normal);

// Use minimal parse for everything else
var replay = reader.ReadReplay(file, ParseType.Minimal);

// Result: Fast parsing with location data

Performance Benchmarking

Here’s a real-world example from ConsoleReader showing performance measurement:
ConsoleReader/Program.cs:16-69
var sw = new Stopwatch();
double totalTime = 0;
int count = 0;
List<double> times = new();

var reader = new ReplayReader(null, new FortniteReplaySettings
{
    PlayerLocationType = LocationTypes.None,
});

foreach (string replayFile in Directory.GetFiles(@"Replays\\"))
{
    Console.WriteLine(replayFile);
    
    for (int i = 0; i < 2; i++)
    {
        ++count;
        
        sw.Restart();
        var replay = reader.ReadReplay(replayFile, ParseType.Full);
        sw.Stop();
        
        Console.WriteLine($"Elapsed: {sw.ElapsedMilliseconds}ms");
        Console.WriteLine($"Total Groups Read: {reader?.TotalGroupsRead}");
        Console.WriteLine($"Failed Bunches: {reader?.TotalFailedBunches}");
        
        totalTime += sw.Elapsed.TotalMilliseconds;
        times.Add(sw.Elapsed.TotalMilliseconds);
    }
    
    Console.WriteLine();
}

var fastest5 = times.OrderBy(x => x).Take(10);

Console.WriteLine($"Total Time: {totalTime}ms");
Console.WriteLine($"Average: {((double)totalTime / count):0.00}ms");
Console.WriteLine($"Fastest 10 Average: {(fastest5.Sum() / fastest5.Count()):0.00}ms");

Benchmarking Your Configuration

Create a simple benchmark to test different configurations:
using System.Diagnostics;

void BenchmarkConfiguration(string name, FortniteReplaySettings settings, ParseType parseType)
{
    var reader = new ReplayReader(null, settings);
    var sw = Stopwatch.StartNew();
    
    var replay = reader.ReadReplay("test.replay", parseType);
    
    sw.Stop();
    Console.WriteLine($"{name}: {sw.ElapsedMilliseconds}ms");
}

// Test different configurations
BenchmarkConfiguration("Minimal", new FortniteReplaySettings
{
    PlayerLocationType = LocationTypes.None,
    IgnoreHealth = true,
    IgnoreShots = true,
    IgnoreInventory = true,
    IgnoreFloorLoot = true
}, ParseType.Minimal);

BenchmarkConfiguration("Balanced", new FortniteReplaySettings
{
    PlayerLocationType = LocationTypes.User,
    LocationChangeDeltaMS = 1000,
    IgnoreFloorLoot = true
}, ParseType.Normal);

BenchmarkConfiguration("Full", new FortniteReplaySettings
{
    PlayerLocationType = LocationTypes.All,
    LocationChangeDeltaMS = 0
}, ParseType.Full);

Memory Optimization

For processing many replays, consider these memory management techniques:

Process One at a Time

foreach (var file in replayFiles)
{
    var reader = new ReplayReader(null, settings);
    var replay = reader.ReadReplay(file, ParseType.Minimal);
    
    // Extract needed data
    var data = ExtractEssentialData(replay);
    
    // Allow GC to collect replay
    replay = null;
    reader = null;
    
    // Process extracted data
    ProcessData(data);
}

Stream Processing

// Process replays as a stream
var results = replayFiles
    .Select(file => {
        using var reader = new ReplayReader();
        var replay = reader.ReadReplay(file, ParseType.Minimal);
        return new {
            File = file,
            Eliminations = replay.Eliminations.Count,
            Winner = replay.GameInformation.Players
                .FirstOrDefault(p => p.Placement == 1)?.DisplayName
        };
    })
    .ToList();

Limit Data Collection

// Only extract what you need
var playerStats = replay.GameInformation.Players
    .Select(p => new PlayerSummary
    {
        Name = p.DisplayName,
        Kills = p.TotalKills,
        Placement = p.Placement
        // Don't store: Locations, Shots, Inventory
    })
    .ToList();

// Clear references to allow GC
replay = null;

Performance Tips Summary

1

Choose the Right Parse Type

Use the lowest ParseType that meets your needs:
  • EventsOnly for eliminations only
  • Minimal for basic player info
  • Normal for location tracking
  • Full only when necessary
2

Configure Settings

Disable unnecessary tracking:
  • Set PlayerLocationType = None if locations not needed
  • Increase LocationChangeDeltaMS to reduce location frequency
  • Enable Ignore* flags for unused data
3

Use Granular Control

For advanced scenarios, use SetParseType for fine-grained control
4

Manage Memory

Process replays one at a time and extract only needed data

Performance Impact Table

OptimizationPerformance GainData Impact
ParseType.EventsOnly🚀🚀🚀 60-80%Only events
ParseType.Minimal🚀🚀 40-60%Basic game state
PlayerLocationType = None🚀 30-50%No locations
LocationChangeDeltaMS = 1000🏃 15-25%Reduced location frequency
IgnoreFloorLoot = true🏃 10-20%No floor loot
IgnoreInventory = true🏃 10-15%No inventory
IgnoreShots = true🚶 5-10%No shot data
IgnoreHealth = true🚶 5-10%No health updates
Performance gains are approximate and vary based on replay size, match duration, and hardware.

Next Steps

Configuration

Learn more about FortniteReplaySettings

Reading Replays

Back to reading replay basics

Build docs developers (and LLMs) love