#11734: sage_wraps should only read the sources of wrapped functions when
needed.
-------------------------+--------------------------------------------------
Reporter: SimonKing | Owner: jason
Type: defect | Status: needs_review
Priority: blocker | Milestone: sage-4.7.2
Component: misc | Keywords: sage_wraps sources gentoo
startuptime
Work_issues: | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies:
-------------------------+--------------------------------------------------
Old description:
> According to private conversation with Francois Bissey, #9976 has
> introduced a problem that makes it impossible start sage-4.7.1 on Gentoo.
> That's pretty serious, and so this ticket is a blocker.
>
> The problem is that sage_wraps reads the sources of to-be-wrapped
> functions and methods. The sources are stored as an attribute to the
> wrapper, which, on the one hand, is a waste of memory. Worse: Reading the
> Cython sources is impossible for sage-on-gentoo. Therefore, sage can't
> start.
>
> My patch introduces some lightweight classes, that simply store a
> reference to an object (e.g., the to-be-wrapped function) and return the
> sources or source lines or the argument list ''only when called''.
New description:
According to private conversation with Francois Bissey, #9976 has
introduced a problem that makes it impossible start sage-4.7.1 on Gentoo.
That's pretty serious, and so this ticket is a blocker.
The problem is that sage_wraps reads the sources of to-be-wrapped
functions and methods. The sources are stored as an attribute to the
wrapper, which, on the one hand, is a waste of memory. Worse: Reading the
Cython sources is impossible for sage-on-gentoo. Therefore, sage can't
start.
My patch introduces some lightweight classes, that simply store a
reference to an object (e.g., the to-be-wrapped function) and return the
sources or source lines or the argument list ''only when called''.
Apply:
[attachment:trac11734_sage_wraps_no_sourceread_lambda.patch]
--
Comment(by SimonKing):
I can confirm that the doc tests pass. I can also confirm that your patch
provides a similar (small) positive side effect (comparable to what I
stated on my patch) on startuptime and memory consumption.
Please add the above "bugfix" example to your patch. In the author field,
please replace my name by yours.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11734#comment:9>
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.