Closed macisamuele closed 2 years ago
@sjaensch hope that you're doing well. Sorry for the long turnaround for this PR.
I've tried to resume the work on this PR, I've addressed few comments. In the next days I'll try to get back to speed with this as by running few quick benchmarks (just to revalidate the status-quo) I've noticed some small inconsistencies with the results (but I'd like to investigate a bit more before raising additional concerns)
The goal of this PR is to reduce the performance gap present while unmarshaling schemas if
use_models
is enabled or disabled.In order to achieve the performance parity between models disabled (so raw
dict
) and models enabled (sobravado_core.model.Model
) I've ensured thatModel
class extendsdict
.In order to prevent unexpected regressions I've made sure that no tests would have been modified after the changing
Model
base class. This is true except for the last commit (6374839) where there is a backward incompatible change (from commit message)Some hightligths:
Raw data are available on https://gist.github.com/macisamuele/dcd58fafd470c80902643760e4eb87ea