Make the default computation in .create() a bit more efficient
The computation of the default value in create()
is a bit inefficient because for every value in the value list we loop over all the fields. If the number of fields is big and the values to create are also quite big it could result in some inefficiency.
We could compute all the defaults before the loop, but it would make a useless call and if some default computation is slow it could penalize more than the gains. Another way would be to store what defaults values are needed and loop only once per 'schema' of default values missing. This would be quite efficient as we usually create always the same kind of dictionary.