#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 SimonKing):
You raised the question whether actions (and perhaps maps as well) are
garbage collected too often. I inserted some lines of code into the init
method of `sage.categories.map.Map` and `sage.categories.action.Action`
that counts how often the init method is called (namely by appending one
character to some file on my disk). Then, I ran the doctests in
`sage.schemes`. Result:
__With #11780 only__
* 76102 maps
* 41381 actions
* 647.3 seconds
__With #11780 and #715__
* 76192 maps
* 46157 actions
* 658 seconds
So, actions are created about 10% more often than without the patch, while
the speed regression is not so dramatic.
Two explanations:
1. These 10% of actions would have been needed, and it is ''bad'' that
they were garbage collected.
2. One file contains many tests, and often these tests are quite similar.
In particular, many actions will occur in many different tests. Without
the patch, the actions created by the first test are strongly cached and
are thus still available for the second, third, ... test. But with the
patch, the actions created by the first test will be garbage collected
when the first test is done. Hence, it is ''good'' that they were garbage
collected.
In order to find out whether 1. or 2. is the correct explanation, I'll
determine the number of maps and actions created in "single" computations,
namely in the benchmarks discussed at #11900.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/715#comment:135>
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.