#17025: sql/where.py WhereNode refactoring
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: 1.3
Component: Database layer | Resolution:
(models, ORM) | Triage Stage:
Severity: Normal | Unreviewed
Keywords: orm cleanup | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by akaariai):
Yeah, true. I don't know anything about pickling / unpickling, but I have
tried to make the model initialization faster. For example if you fetch
1000 models from local SQLite DB, about 75% of the time is used in model
`__init__`. As far as I can see, the `__init__` is as fast as possible
without going to code generation or C coding, and without breaking
backwards compatibility.
I actually think I will make an external CFastModel one day. It implements
a custom `__init__` method but is otherwise just like normal Model. I
haven't got a clue how hard that is to do, because I haven't done any
Python extensions in C. And that is the reason why I am going to try to do
it :)
I will try to test this ticket's patch with models containing more fields.
I suspect the more fields, the lesser the effect of this patch. It would
also be interesting to test select_related calls, queries with joins and
so on. For those interested in this ticket, this is one way to help...
--
Ticket URL: <https://code.djangoproject.com/ticket/17025#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.