#17: Metasystem optimization: Share select_related in memory
----------------------+-----------------------------------------------------
   Reporter:  adrian  |                Owner:  adrian          
     Status:  new     |            Component:  Database wrapper
    Version:          |           Resolution:                  
   Keywords:          |                Stage:  Accepted        
  Has_patch:  1       |           Needs_docs:  0               
Needs_tests:  1       |   Needs_better_patch:  1               
----------------------+-----------------------------------------------------
Comment (by [EMAIL PROTECTED]):

 re: patch2.diff, that's broke- note
 {{{
 self.__instance_cache__.setdefault(getattr(self, self._meta.pk.attname,
 self))
 }}}
 
 that setdefault's a None in place.  Should be
 {{{
 self.__instance_cache__[getattr(self, self._meta.pk.attname)] = self
 }}}
 instead; Forces the cache to reuse the last saved version whenever the
 next request comes in.
 
 Aside from that, patch has issues with json/xml serialization bits which
 basically just requires disabling instance caching for generation of the
 'detached' instance that haven't yet been saved.
 
 Replying to [comment:9 David Cramer <[EMAIL PROTECTED]>]:
 > There is still an issue with delete objects. We are implementing patch
 #1796 as I was told it may help resolve this issue (and we also needed to
 resolve the issue it addresses).
 >
 > The current problem is it's trying to .delete() it twice (at least it
 seems) so when the second time comes around there is no id attribute set
 so it throws an AssertionError
 Got a test case?  I'm offline for the next 36 hours, but have got a local
 patch (will post when the system is online) passing all unittests at this
 point- haven't seen anything delete related in local fixing.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/17#comment:10>
Django Code <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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to