#13387: Improve MonoDict and TripleDict data structures
----------------------------------+-----------------------------------------
       Reporter:  nbruin          |         Owner:  Nils Bruin  
           Type:  enhancement     |        Status:  needs_review
       Priority:  major           |     Milestone:  sage-5.8    
      Component:  memleak         |    Resolution:              
       Keywords:                  |   Work issues:              
Report Upstream:  N/A             |     Reviewers:              
        Authors:  Nils Bruin      |     Merged in:              
   Dependencies:  #11521, #12313  |      Stopgaps:              
----------------------------------+-----------------------------------------

Old description:

> On #715 and #12313 some variants of WeakKeyRef data structures are
> introduced, used in caching for, among other things, uniqueness of
> parents and coercions. In
> [http://trac.sagemath.org/sage_trac/ticket/12313#comment:162 #12313
> comment 162] is some data on how these data structures can be improved.
>
> '''Apply:'''
>
>  - [attachment:trac_13387-combined.patch]

New description:

 On #715 and #12313 some variants of WeakKeyRef data structures are
 introduced, used in caching for, among other things, uniqueness of parents
 and coercions. In
 [http://trac.sagemath.org/sage_trac/ticket/12313#comment:162 #12313
 comment 162] is some data on how these data structures can be improved.

 '''Apply:'''

  - [attachment:trac_13387-combined.patch]
  - [attachment:trac_13387-guard_GC.patch]

--

Comment (by nbruin):

 Therapeutic despair. The solution is obvious! Just disable garbage
 collection for the duration of the critical block. That way Python can
 "queue" the callbacks for us. This should ensure that `MonoDict.resize`
 and `TripleDict.resize` are safe.

 Iteration comes "buyer beware" and I don't think any code uses it
 presently anyway.

 Apply trac_13387-combined.patch, trac_13387-guard_GC.patch

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13387#comment:36>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to