#5970: Weak references in Polynomial Ring cache
--------------------------------------------+-------------------------------
Reporter: SimonKing | Owner: malb
Type: defect | Status: needs_info
Priority: critical | Milestone: sage-4.6.2
Component: commutative algebra | Keywords: polynomial ring
cache weak reference
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: regression for test_ec_leak? |
--------------------------------------------+-------------------------------
Comment(by SimonKing):
Now I really wonder whether this ticket is relevant at all.
If I understand correctly, the purpose of this ticket is to use weak
references, so that unused polynomial rings can be removed from the cache.
But the "test suite" in `test.sage` is not affected from the length of the
cache:
{{{
sage: attach test.sage
sage: from sage.rings.polynomial.polynomial_ring_constructor import _cache
sage: len(_cache)
16
sage: %time test_poly_leak(10^5)
CPU times: user 11.06 s, sys: 0.13 s, total: 11.18 s
Wall time: 11.19 s
330.40625
sage: len(_cache)
9608
sage: %time test_ec_leak(10^5)
CPU times: user 27.01 s, sys: 0.11 s, total: 27.12 s
Wall time: 27.13 s
192.51171875
sage: len(_cache)
9608
}}}
The memory consumption depends on applying the patch. But `len(_cache)` is
the same, with or without the patch.
Also, the original problem
{{{
sage: for p in primes(2,1000000):
....: print get_memory_usage()
....: R.<x,y,z> = GF(p)[]
}}}
does not seem to be seriously affected by the patch (at least when one has
the patches from #8611, #10467 and #10496 applied on top of
`sage-4.6.2.alpha0`.
Thoughts?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5970#comment:19>
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.