#715: Parents probably not reclaimed due to too much caching
------------------------+---------------------------------------------------
Reporter: robertwb | Owner: somebody
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.8
Component: coercion | Keywords: weak cache coercion
Work_issues: | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies: #9138, #11900
------------------------+---------------------------------------------------
Comment(by vbraun):
Actions have strong references to domain and codomain, so its no surprise
that they keep their coercion cache entry alive. But I don't understand
how storing a weak reference to the action can work; Nothing else keeps
the action alive unless it happens to be used while the garbage collector
is running. So actions are essentially not cached any more. It seem that
either actions should only store weak references to domain/codomain or we
implement some ring buffer that keeps the last N coerce maps
unconditionally alive.
In fact, the action's reference to domain and codomain seem to be for
convenience only. After all you know domain and codomain when you constuct
the action and when you pick it from the cache, so there shouldn't be much
incentive to look it up. Perhaps it would be easy to make them weak refs,
did you look into that?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/715#comment:65>
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 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/sage-trac?hl=en.