#13387: Improve MonoDict and TripleDict data structures
----------------------------------+-----------------------------------------
Reporter: nbruin | Owner: Nils Bruin
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.8
Component: memleak | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Nils Bruin | Merged in:
Dependencies: #11521, #12313 | Stopgaps:
----------------------------------+-----------------------------------------
Comment (by nbruin):
Replying to [comment:49 SimonKing]:
> What is the startup_modules script complaining about?
It's complaining that there seems to be a new module now,
`sage.structures.gc`. I don't know why that's a bad thing. It's a direct
consequence of the statement `import gc` that I added, which I need
because I need to do `gc.enable()` and `gc.disable()`. This is in a
routine that should rarely execute and has an expensive inner loop that
doesn't contain these statements, so I don't think the python method calls
are going to make a difference. Furthermore, I wasn't able to find a
C-level interface to this functionality. I've checked the source of the
`GC` module and the underlying C routines are explicitly declared
`static`, so our only access seems to be via method lookup.
If someone has a recommended way of accessing this functionality without
importing gc, that's fine with me. Moving the `import gc` statement into
runtime, say one of the __init__ methods is a bad idea: Several of these
dictionaries get instantiated every time a parent's coercion framework is
initialized (which can be pretty often), but a documented C-level API for
turning gc on and off would be fine.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13387#comment:50>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.