Two of the above ideas are implemented in the added tests in
https://github.com/akaariai/django/compare/akaariai:model_save_refactor...akaariai:model_state_improvements.
The patch is based on model_save_refactor from #16649.
The cost of this is a performance penalty of a 3-5% for instantiating
single-field models from DB (query_all benchmark of djangobench), less for
multi-field models.
I'd like to keep this private API for a while until more is known about
what kinds of states are needed.
--
Ticket URL: <https://code.djangoproject.com/ticket/19396>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Design decision needed
Comment:
Seems like a reasonable idea on the face of it, but needs some more
discussion before we formally accept the idea.
--
Ticket URL: <https://code.djangoproject.com/ticket/19396#comment:1>
* stage: Design decision needed => Accepted
Comment:
I think it would be great to have.
--
Ticket URL: <https://code.djangoproject.com/ticket/19396#comment:2>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/19396#comment:3>