perf: add linked format checks to skip redundant field tests - #265
perf: add linked format checks to skip redundant field tests#265bolinocroustibat wants to merge 10 commits into
Conversation
Pierlou
left a comment
There was a problem hiding this comment.
Happy to see this improvement in the pipes, thanks for the work 💪
Just a couple suggestions/open questions to discuss, but the logic looks good to me, nice to see the benchmark numbers 📉
|
@Pierlou I'm wondering if I should also create a PR with the other logic you suggested, where we test parents first and only run children when the parent succeeds, and then run the benchmarks on this second PR as well? It's quite fast to do so with LLMs. I'm not sure if our big synthetic big file for performance benchmarking will be adapted to fully test those cases though. |
We could do that but I believe the "children first then propagate to parents" is better, because we have early stops in
For invalid values, early stops allow not to spend time checking the whole column in both cases. |
Pierlou
left a comment
There was a problem hiding this comment.
Very nice, long-awaited improvement 👏
|
@Pierlou FYI, also added this add "float" as parent of "money" and "percent" to the PR before merging |
This reverts commit 883ec35.
Reverted after discussion |
Supersedes #155, re-implemented on the current
Format/FormatsManagerarchitecture.Description
Instead of testing all formats for all columns, we introduce a parent-child relationship between formats, for instance:
float>latitude_wgs>latitude_wgs_fr_metropole, with aparentattribute on specialized format modules.For each column:
This way, if a column is
latitude_wgs_fr_metropole, we only run one full-column float check instead of three.This is not perfect: copying the child's score to the parent can be misleading (many floats are invalid latitudes), but it saves significant processing time. A safer alternative would be to test parents first and only run children when the parent succeeds.
Benchmark comparison
Run count
All benchmark sessions
33891c433891c46d9c1016d9c1016d9c1016d9c1016d9c1016d9c101e21b750e21b750e21b750e21b750e21b750e21b7504626c254626c25All times in seconds.
Summary
feat/linked-checks vs main