Closed
Labels
builddocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
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 andstring.Format- ICU MessageFormat vs. calling the MessageFormat library directly
- XAML extensions (
LocalizeExtension,Argumentchildren,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. Theaccept-allocation-increaselabel turns this failure into an alert. - Reports time regressions above a threshold without failing.
- Fails a PR when a benchmark allocates more than 125% of its bytes on
- Published results on the GitHub Pages docs site: the latest run, and a history chart over the last 200 commits on
main, stored in abenchmark-databranch. - 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.
Metadata
Metadata
Assignees
Labels
builddocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Activity
[-]Add benchmarks[/-][+]Add a performance benchmark suite with CI regression checks[/+]feat: Add a performance benchmark suite with CI regression checks (#56)