norm icon indicating copy to clipboard operation
norm copied to clipboard

`Norm.valid?/2` becomes prohibitively slower after a certain amount of records to validate

Open gesta opened this issue 5 years ago • 0 comments

Problem: A conformity check is building two separate lists, consisting of the valid and invalid records, with a max total sum of the length of the input, which is becoming prohibitively slower after ~30 thousand records. This holds true for a validation check, as under the hood it performs a conformity check and matches the result.

Proposal: Optimise the validation check to not keep temporary results, while replicating the conformity check patterns. As an extra bonus (for multiple checks performed under a single validation) the validation stops once any check fails.

gesta avatar Apr 09 '20 10:04 gesta