#17: Metasystem optimization: Share select_related in memory ---------------------------------------------------+------------------------ Reporter: adrian | Owner: PhiR Status: assigned | Milestone: Component: Database layer (models, ORM) | Version: SVN Resolution: | Keywords: feature caching Stage: Accepted | Has_patch: 1 Needs_docs: 1 | Needs_tests: 0 Needs_better_patch: 1 | ---------------------------------------------------+------------------------ Comment (by anonymous):
was talking with PhiR in the IRC channel. [http://www.gln2008.com/ ed hardy t shirt] I would just like to mention two issues: 1. Thread safety -- for python > 2.3 we can wrap the storage in threading.local to avoid issues. Though maybe making it thread-aware could lead to other enhancements (and lots of trouble). Each thread gets it's own view of the cache- trying to allow instance sharing across threads means that thread 1 (which is doing an edit that will ultimately fail) is screwing with the data thread 2 (which is doing a simple view rendering) uses, meaning bad mojo... and if someone suggests locking to try and duck that, I wedgie them, that's even worse mojo ;) As I understand it the storage is part of the class object, which is global, no? So currently the patch does not behave like this and this will need to be addressed. -- Ticket URL: <http://code.djangoproject.com/ticket/17#comment:54> Django <http://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 django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.