How to Adjust Reading Speed in C# with IronBarcode

IronBarcode provides four reading speed options (Faster, Balanced, Detailed, ExtremeDetail) that let you control the trade-off between processing speed and accuracy when reading barcodes in C#, with Balanced being the recommended starting point for most applications.

Introduction

Accuracy is essential when reading large sets of barcodes, but resource allocation and processing efficiency are equally important considerations. The quality of input images determines how a barcode reader should process them—whether to skip preprocessing for clear images or use more resource-intensive options to improve accuracy for degraded barcodes.

IronBarcode provides flexibility to choose the processing speed and accuracy level, allowing you to control every aspect of the barcode reading process. You can make decisions based on your input images and available resources. For more advanced barcode reading scenarios, explore our comprehensive barcode reading tutorial that covers various formats and techniques.

This article provides guidelines for choosing the optimal reading speed for different scenarios. We'll use QR code samples to demonstrate how changing the reading speed affects results. If you're working specifically with QR codes, check our C# QR Code Generator tutorial for creating test samples.

Quickstart: Read a Barcode with Balanced Speed

Use IronBarcode's BarcodeReaderOptions to instantly set the Speed level for your scan. This example shows how to quickly read barcodes using the Balanced setting for fast and reliable results.

Nuget IconGet started making PDFs with NuGet now:

  1. Install IronBarcode with NuGet Package Manager

    PM > Install-Package BarCode

  2. Copy and run this code snippet.

    var results = IronBarCode.BarcodeReader.Read("path/to/image.png", new IronBarCode.BarcodeReaderOptions { Speed = IronBarCode.ReadingSpeed.Balanced });
  3. Deploy to test on your live environment

    Start using IronBarcode in your project today with a free trial
    arrow pointer


What Are the Different Reading Speed Options?

IronBarcode offers four ReadingSpeed options: Faster, Balanced, Detailed, and ExtremeDetail. We'll examine each option using a sample set that contains mostly degraded barcode images with some clear images to demonstrate the library's capabilities. For a complete list of supported formats, visit our supported barcode formats page.

We'll use a .NET benchmark library to measure processing time and memory usage, showing how each option compares and identifying ideal scenarios for each reading speed. We'll demonstrate benchmarking code and a straightforward method for counting successfully read degraded barcodes. For more details on configuring reader options, see our barcode reader settings example.

When Should I Use the Faster Speed Option?

The Faster option provides the fastest barcode reading with minimal resources but reduces accuracy. This process skips image preprocessing and works best when input images are already sharp and clear.

This example sets the Speed property to ReadingSpeed.Faster, imports a directory of barcodes, and prints found barcodes with their values, types, and count per image. To better understand reading barcodes from various image formats, check our guide on reading barcodes from images.

:path=/static-assets/barcode/content-code-examples/how-to/reading-speed-option-faster.cs
using IronBarCode;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;

var optionsFaster = new BarcodeReaderOptions
{
    Speed = ReadingSpeed.Faster
};

// Directory containing PDF files
string folderPath = @"YOUR_FILE_PATH";

// Get all PDF files in the directory
var pdfFiles = Directory.GetFiles(folderPath, "*.jpg");

int countFaster = 0;
var stopwatch = Stopwatch.StartNew();
foreach (var file in pdfFiles)
{
    // Read the barcode
    var results = BarcodeReader.Read(file, optionsFaster);

    if (results.Any())
    {
        Console.WriteLine($"Barcode(s) found in: {Path.GetFileName(file)}");
        foreach (var result in results)
        {
            Console.WriteLine($"  Value: {result.Value}, Type: {result.BarcodeType}");
            countFaster++;
        }
    }
    else
    {
        Console.WriteLine($"No barcode found in: {Path.GetFileName(file)}");
    }
}

stopwatch.Stop();

// Print number of images the barcode reader could decode
Console.WriteLine($"Faster could read = {countFaster} out of {pdfFiles.Length} in {stopwatch.ElapsedMilliseconds}ms");
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

The Faster option detected 146 barcode results out of 430 in 25 seconds, achieving 33.95% accuracy. While fast, this method suits only pristine image conditions. When dealing with multiple barcodes in a single image, consider our guide on reading multiple barcodes for optimal configuration.

The Balanced option balances accuracy and read performance. IronBarcode applies light image processing to clarify the barcode area, making it easier to detect and read. This setting is recommended for most modern images, as light processing typically produces accurate results.

Let's use the same images to demonstrate how Balanced affects output results. For asynchronous operations, explore our guide on async and multithreading with IronBarcode.

:path=/static-assets/barcode/content-code-examples/how-to/reading-speed-option-balanced.cs
using IronBarCode;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;

var optionsFaster = new BarcodeReaderOptions
{
    Speed = ReadingSpeed.Balanced
};

// Directory containing PDF files
string folderPath = @"YOUR_FILE_PATH";

// Get all PDF files in the directory
var pdfFiles = Directory.GetFiles(folderPath, "*.jpg");

int countFaster = 0;
var stopwatch = Stopwatch.StartNew();
foreach (var file in pdfFiles)
{
    // Read the barcode
    var results = BarcodeReader.Read(file, optionsFaster);

    if (results.Any())
    {
        Console.WriteLine($"Barcode(s) found in: {Path.GetFileName(file)}");
        foreach (var result in results)
        {
            Console.WriteLine($"  Value: {result.Value}, Type: {result.BarcodeType}");
            countFaster++;
        }
    }
    else
    {
        Console.WriteLine($"No barcode found in: {Path.GetFileName(file)}");
    }
}

stopwatch.Stop();

// Print number of images the barcode reader could decode
Console.WriteLine($"Balanced could read = {countFaster} out of {pdfFiles.Length} in {stopwatch.ElapsedMilliseconds}ms");
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

The Balanced option detected 237 barcode results out of 430 in 43 seconds. It provides 55.11% accuracy—a significant improvement over Faster—with only a slight time increase. This option maintains efficient balance between memory and speed, making it ideal for most situations and the recommended starting point. This balanced approach works particularly well with proper image preprocessing techniques.

When Do I Need the Detailed Speed Option?

When images are heavily blurred or distorted and Balanced cannot produce clear results, use the Detailed option. It applies medium preprocessing to clarify the barcode area and reduce digital noise for better detection. For severely degraded images, consult our image correction guide which covers various preprocessing techniques.

Let's apply the Detailed setting and observe its effect on output.

:path=/static-assets/barcode/content-code-examples/how-to/reading-speed-option-detailed.cs
using IronBarCode;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;

var optionsFaster = new BarcodeReaderOptions
{
    Speed = ReadingSpeed.Detailed
};

// Directory containing PDF files
string folderPath = @"YOUR_FILE_PATH";

// Get all PDF files in the directory
var pdfFiles = Directory.GetFiles(folderPath, "*.jpg");

int countFaster = 0;
var stopwatch = Stopwatch.StartNew();
foreach (var file in pdfFiles)
{
    // Read the barcode
    var results = BarcodeReader.Read(file, optionsFaster);

    if (results.Any())
    {
        Console.WriteLine($"Barcode(s) found in: {Path.GetFileName(file)}");
        foreach (var result in results)
        {
            Console.WriteLine($"  Value: {result.Value}, Type: {result.BarcodeType}");
            countFaster++;
        }
    }
    else
    {
        Console.WriteLine($"No barcode found in: {Path.GetFileName(file)}");
    }
}

stopwatch.Stop();

// Print number of images the barcode reader could decode
Console.WriteLine($"Detailed could read = {countFaster} out of {pdfFiles.Length} in {stopwatch.ElapsedMilliseconds}ms");
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

The Detailed option detected 237 barcode results out of 430 in 5 minutes and 30 seconds. Its 55.11% success rate on severely degraded barcodes demonstrates its accuracy. However, the significantly increased processing time means this option should be reserved exclusively for degraded barcode images. When working with imperfect barcodes, consult our imperfect barcode handling example for additional strategies.

What Situations Require ExtremeDetail Speed?

The ExtremeDetail setting applies heavy processing to barcode images, significantly reducing reading performance. This CPU-intensive option works best for scanning multiple unclear or blurry barcodes within one input file. Use it as a last resort when other options fail to produce desired results. For high-volume processing scenarios, explore reading barcodes from PDF files which often contain multiple barcodes per page.

Let's apply the ExtremeDetail setting to observe its impact.

:path=/static-assets/barcode/content-code-examples/how-to/reading-speed-option-extreme-detailed.cs
using IronBarCode;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;

var optionsFaster = new BarcodeReaderOptions
{
    Speed = ReadingSpeed.ExtremeDetail
};

// Directory containing PDF files
string folderPath = @"YOUR_FILE_PATH";

// Get all PDF files in the directory
var pdfFiles = Directory.GetFiles(folderPath, "*.jpg");

int countFaster = 0;
var stopwatch = Stopwatch.StartNew();
foreach (var file in pdfFiles)
{
    // Read the barcode
    var results = BarcodeReader.Read(file, optionsFaster);

    if (results.Any())
    {
        Console.WriteLine($"Barcode(s) found in: {Path.GetFileName(file)}");
        foreach (var result in results)
        {
            Console.WriteLine($"  Value: {result.Value}, Type: {result.BarcodeType}");
            countFaster++;
        }
    }
    else
    {
        Console.WriteLine($"No barcode found in: {Path.GetFileName(file)}");
    }
}

stopwatch.Stop();

// Print number of images the barcode reader could decode
Console.WriteLine($"ExtremeDetail could read = {countFaster} out of {pdfFiles.Length} in {stopwatch.ElapsedMilliseconds}ms");
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

The ExtremeDetail option identified 313 out of 430 barcode images in approximately 10 minutes. While achieving impressive 72.79% accuracy on severely degraded barcodes, its high resource consumption makes it suitable only as a last resort. Consider preprocessing images before using this option.

How Do the Different Speeds Compare?

ModeBarcodes FoundMean TimeTime per FileGC PressureAccuracy Gain
Faster147/430 (33.95%)25 s0.058 sHigh (Gen2: 177K)Baseline
Balanced237/430 (55.11%)43 s0.1 sHigh (Gen2: 151K)+62.32% vs Faster
Detailed237/430 (55.11%)5.50 min0.767 sVery High (Gen2: 297K)+0% vs Balanced
ExtremeDetail313/430 (72.79%)10.14 min1.414 sExtreme (Gen2: 4.74M)+32.08% vs Detailed

How Do I Choose the Right Speed for My Application?

Based on the comparisons above, start with the Faster setting and progress through Balanced, Detailed, and ExtremeDetail to identify significant output differences. For most scenarios, Balanced handles everything adequately. Use Detailed and ExtremeDetail only for heavily distorted images.

Although Detailed and ExtremeDetail apply medium and heavy processing, sometimes it's more efficient to split the process—apply image filters manually before barcode reading rather than using a single process. For more information on preprocessing images, refer to this guide.

Which Speed Setting Matches My Use Case?

Decision tree for sampling speed selection based on image quality, from Faster to Detailed+ExtremeDetail options

Frequently Asked Questions

What are the four barcode reading speed options available?

IronBarcode offers four ReadingSpeed options: Faster, Balanced, Detailed, and ExtremeDetail. Each option provides a different balance between processing speed and accuracy, with Balanced being the recommended starting point for most applications.

How do I set the reading speed when scanning barcodes?

You can set the reading speed using the BarcodeReaderOptions class in IronBarcode. Simply create a new BarcodeReaderOptions object and set the Speed property to your desired ReadingSpeed value (Faster, Balanced, Detailed, or ExtremeDetail), then pass it to the Read method.

Which reading speed option should I use for my application?

IronBarcode recommends starting with the Balanced speed setting for most applications. If you have high-quality, clear barcode images, you can use Faster mode. For degraded or poor-quality images, consider using Detailed or ExtremeDetail modes for better accuracy.

What's the trade-off between different reading speed options?

The trade-off in IronBarcode's reading speeds is between processing speed and accuracy. Faster mode processes images quickly but may miss barcodes in poor-quality images. ExtremeDetail mode provides the highest accuracy but requires more processing time and memory resources.

Can I read multiple barcode formats with different speed settings?

Yes, IronBarcode supports reading various barcode formats including QR codes with all speed settings. The speed setting affects the processing approach but doesn't limit the types of barcodes you can read. Visit the supported barcode formats page for a complete list.

How does image quality affect which reading speed I should choose?

Image quality directly impacts your speed selection in IronBarcode. Clear, high-quality barcode images can be processed efficiently with Faster mode. Degraded, blurry, or low-contrast images require Detailed or ExtremeDetail modes to ensure accurate barcode detection and reading.

What is the minimal workflow for reading barcodes with speed options?

The minimal workflow with IronBarcode involves 5 steps: 1) Download the C# library, 2) Use BarcodeReaderOptions to set reading speed, 3) Call the Read method with your image path, 4) Extract and print barcode values, 5) Evaluate performance trade-offs between different speeds.

How do I measure the performance impact of different reading speeds?

IronBarcode's performance with different reading speeds can be measured using .NET benchmark libraries to track processing time and memory usage. This helps you identify the optimal speed setting for your specific use case and resource constraints.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 2,002,059 | Version: 2025.12 just released