#715: Parents probably not reclaimed due to too much caching
-------------------------------------------------------------------+--------
Reporter: robertwb |
Owner: somebody
Type: defect |
Status: needs_review
Priority: major |
Milestone: sage-5.4
Component: coercion |
Resolution:
Keywords: weak cache coercion Cernay2012 | Work
issues:
Report Upstream: N/A |
Reviewers: Jean-Pierre Flori, Simon King, Nils Bruin
Authors: Simon King, Jean-Pierre Flori | Merged
in:
Dependencies: #9138, #11900, #11599, to be merged with #11521 |
Stopgaps:
-------------------------------------------------------------------+--------
Comment (by SimonKing):
I really wonder about the use of `ClearCacheOnPickle` here. Quite simply:
`ClearCacheOnPickle` can not work together with a method whose pickling
relies on a `__reduce__` method. It will only work for objects that are
pickled via `__getstate__`.
In particular, since `loads(dumps(W))` ''is'' `W`, there is nothing
emptied. And even when storing it on disc, the cache is not emptied:
{{{
sage: W = WeylGroup(['A',3])
sage: W.cartan_type
Cached version of <function cartan_type at 0x10aad5398>
sage: W.cartan_type.cache
['A', 3]
sage: save(W,'tmp')
}}}
Start new session
{{{
sage: W = load('tmp.sobj')
sage: W.cartan_type.cache
['A', 3]
}}}
Hence, it makes absolutely no sense to me that
`sage.combinat.root_system.weyl_group.WeylGroup_gens` inherits from
`ClearCacheOnPickle` and `UniqueRepresentation` at the same time - both
bases are orthogonal. I think `ClearCacheOnPickle` should be removed here.
However, as I just tested: Dropping `ClearCacheOnPickle` will not fix the
signal 11.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/715#comment:289>
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.