You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We really love this library and are using it extensively!
I was wondering the rationale for strictly creating copies of the resulting schema. Where this is probably the best default behavior, it has some penalty in performance (when dealing with millions of objects). I haven't looked much into how can this be accomplished to avoid doing work that's not going to be incorporated back.
Beyond performance, one of the side-effects of copying the validated object is instantiation of a new object of the same type. For us it creates a bit of an issue since we instantiate a dict-subclass object that requires parameters to create. One approach could be allowing specifying the type to instantiate. Another approach to solving this side-effect is enabling passing arguments for the instantiation.
Looking forward to your thoughts!
The text was updated successfully, but these errors were encountered:
While I'm not specifically opposed to the idea, I'm not sure it could support both modes of operation without some serious ugliness. Have you tried prototyping an implementation?
If you aren't opposed I will experiment a little. I also suspect it won't be super easy, but since it's a big part of our project the performance increase could be significant for us. I will report back when I get a chance.
What about bullet 2 above? providing a different type for instantiating and/or providing args to pass to it?
We really love this library and are using it extensively!
I was wondering the rationale for strictly creating copies of the resulting schema. Where this is probably the best default behavior, it has some penalty in performance (when dealing with millions of objects). I haven't looked much into how can this be accomplished to avoid doing work that's not going to be incorporated back.
Beyond performance, one of the side-effects of copying the validated object is instantiation of a new object of the same type. For us it creates a bit of an issue since we instantiate a dict-subclass object that requires parameters to create. One approach could be allowing specifying the type to instantiate. Another approach to solving this side-effect is enabling passing arguments for the instantiation.
Looking forward to your thoughts!
The text was updated successfully, but these errors were encountered: