#715: Parents probably not reclaimed due to too much caching
----------------------------+-----------------------------------------------
Reporter: robertwb | Owner: somebody
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.8
Component: coercion | Keywords: weak cache coercion
Work_issues: fix doctests | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies: #9138, #11900
----------------------------+-----------------------------------------------
Changes (by SimonKing):
* work_issues: Comparison of the third key items => fix doctests
Comment:
As announced, I have attached an experimental patch. It provides two
variants of `TripleDict`, namely using "==" or "is" for comparison,
respectively. Both are used, namely for caching coerce maps or actions,
respectively.
It could be that a last-minute change was interfering, but I am confident
that all but the following three tests pass:
{{{
sage -t devel/sage-main/doc/en/bordeaux_2008/nf_introduction.rst
# 1 doctests failed
sage -t devel/sage-main/sage/modular/modsym/space.py #
Killed/crashed
sage -t devel/sage-main/sage/structure/coerce_dict.pyx # 3
doctests failed
}}}
The memory leak exposed in the ticket description is fixed (more or less):
{{{
sage: K = GF(1<<55,'t')
sage: a = K.random_element()
sage: for i in range(500):
....: E = EllipticCurve(j=a)
....: P = E.random_point()
....: Q = 2*P
....:
sage: import gc
sage: gc.collect()
862
sage: from sage.schemes.generic.homset import
SchemeHomsetModule_abelian_variety_coordinates_field
sage: LE = [x for x in gc.get_objects() if
isinstance(x,SchemeHomsetModule_abelian_variety_coordinates_field)]
sage: len(LE)
2
}}}
I am not sure whether this makes #11521 redundant.
For now, it is "needs work, because of the doctests. But you can already
play with the patch.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/715#comment:39>
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.