DamianEdwards / MiniValidation

A minimalist validation library for .NET built atop the existing features in `System.ComponentModel.DataAnnotations` namespace
MIT License
321 stars 25 forks source link

Optimize the string allocations #39

Open DamianEdwards opened 1 year ago

DamianEdwards commented 1 year ago

The validator has to allocate strings for each field it validates, including adding a level prefix as it descends the object graph, even if there don't end up being any errors. Would be good to look at if there's a way to minimize these allocations.

Examples: