#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 Suor):
Under heavy load I get more model instances from cache than from db. So
unpickling was a great issue for me.
And I came up with https://gist.github.com/974735 to speed it up and same
some space.
Regarding `Model.__init__()` it looks like it should be optimized together
with `QuertSet.iterator()`. Also, a common case when `len(args) ==
len(self._meta.fields)` could be optimized by use of a precached list of
field attnames instead of `fields_iter` (see gist above for `attnames()`
function).
The second optimization that comes to mind is optimizations of signals
handling. Now system stores a list of handlers for each event and when a
signal is sent it filters that list with `isinstance()` call to restrict
sender. Storing handlers in a proper structure (a dict sender_class ->
list of handlers looks nice) will make sending signals faster.
--
Ticket URL: <https://code.djangoproject.com/ticket/17025#comment:6>
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.