Skip to content

Add a performance benchmark suite with CI regression checks #53

Closed

Description

@rent-a-developer

Why

ResXLocalization has no performance measurements. Nothing catches a change that makes lookups slower or makes them allocate more. Consumers also can't see what the library costs their app, including with thousands of localized elements and a live culture switch.

What

  • BenchmarkDotNet suite in benchmarks/ (Core, Avalonia and WPF), measured against what a consumer would write without the library:
    • Localizer.Current.Get (typed, scoped, search-all and enum keys, with and without arguments) vs. the ResX designer class and string.Format
    • ICU MessageFormat vs. calling the MessageFormat library directly
    • XAML extensions (LocalizeExtension, Argument children, LocalizeEnumExtension) per element vs. {x:Static}
    • Scaling: opening a view and switching the culture with 100 and 10,000 live bindings
  • CI job that runs on PRs and pushes to main, in parallel with the build and in under 10 minutes:
    • Fails a PR when a benchmark allocates more than 125% of its bytes on main. The accept-allocation-increase label turns this failure into an alert.
    • Reports time regressions above a threshold without failing.
  • Published results on the GitHub Pages docs site: the latest run, and a history chart over the last 200 commits on main, stored in a benchmark-data branch.
  • Docs page explaining what the numbers mean for an application.

Out of scope

  • Comparisons with other localization libraries
  • Native AOT; benchmarks run on the .NET 10 JIT only

No shipped package, public API or runtime behavior changes.

Activity

  1. changed the title [-]Add benchmarks[/-] [+]Add a performance benchmark suite with CI regression checks[/+] on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

builddocumentationImprovements or additions to documentationenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions