Similar to `__slots__` for `SafeString` #33465 this could theoretically
reduce memory usage, with less chance of breaking things compared to
actually using `__slots__`.
https://github.com/collinanderson/django/commit/41b2f0d6928b1a837df6d57169313d6b5f535a5d
I'm mostly just throwing this out there to add to the discussion and see
what people think. Totally cool if it doesn't get merged.
--
Ticket URL: <https://code.djangoproject.com/ticket/33502>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/15410
--
Ticket URL: <https://code.djangoproject.com/ticket/33502#comment:1>
* cc: Keryn Knight (added)
* status: new => closed
* resolution: => needsinfo
Comment:
Thanks for the idea! This is a bit similar to the
[https://github.com/django/django/pull/15126 PR15126]. As far as I'm aware
access to class attributes are slower than access to instance attributes,
so we should benchmark proposed solution and check for performance
regression. It'd also be nice to compare the memory usage.
--
Ticket URL: <https://code.djangoproject.com/ticket/33502#comment:2>