Closed kylecarbs closed 5 months ago
@kylecarbs out of curiosity, what is your use case where 10ms
is not tolerable?
@deankarn this package is imported in our CLI. Adding that overhead to every invocation (even help) isn't great.
@deankarn any changes needed for me to push this through?
@kylecarbs sorry for the lateness of my reply, been busy.
My only concern is the sync.Mutex
overhead for longer running applications, can you change the implementation to use sync.Once instead which uses lower level atomics?
@deankarn good idea. Will change in a bit!
I will check back later tonight/tomorrow :)
Using
GODEBUG=inittrace=1
I found a relatively constant 10ms init caused by this function.@go-playground/validator-maintainers