dry-validation: Schema definition is too slow
First of all, thank you so much for making dry-validation. At @Shopify, we are looking forward to try it on our scale.
This is not particularly dry-validation issue, but for some reason the gem require time is quite slow:
require 'bundler/setup'
require 'benchmark'
puts Benchmark.measure {
require 'dry-validation'
}
$ ruby bench.rb
0.240000 0.150000 0.390000 ( 0.401198)
That’s 400ms or almost half a second just to require the gem. All credits to @casperisfine for discovering this problem.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (6 by maintainers)
There we go:
This means there will be no practical difference between schema with or without coercions (via type specs) 😃 This is in a branch, I gotta clean some things up and merge it to master. I’ll close this issue once that’s done.
Thank you for the new release! I’ve checked it with our huge schema and results are pretty good. It takes around 7ms for the schema definition 🚀 🚀 🚀