New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avoid creating unneeded homsets when coercing #4740
Comments
Attachment: trac_4740_coerce-leak.patch.gz Patch by RobertWB, originally from #4639 |
comment:1
Patch by RobertWB, review by William. Cheers, Michael |
comment:2
This patch causes a failure with the pickle jar:
Cheers, Michael |
comment:3
Once the pickling issue is fixed this should go in. Cheers, Michael |
comment:4
Robert, the leak seems to be gone in 3.2.2:
Should we close this ticket as won't fix or is the patch her still relevant? In that case we should update the ticket to reflect the actual issue being fixed here. Cheers, Michael |
comment:5
The patch is still relevant here. What is going on is every time coerce is called, a new homset is created. Creating a new homset doesn't leak anymore, but it's still sub-optimal. I don't know that I'll have time to look into this anytime soon, but it's not a blocker anymore as the leak is solved elsewhere. |
comment:6
ok, I renamed the ticket then. Cheers, Michael |
comment:7
Hi Robert, accidentally I found this rather old ticket. Replying to @robertwb:
Is this still the case? In what situation is the homset created? Is it not cached? In what files does it occur? Cheers, |
comment:8
I also found this ticket. It could be very well that this is still causing memory leaks. Look for example at the reference chain that is keeping ModularSymbols alive at #10548 |
comment:20
I didn't notice that if S is self:
from sage.categories.homset import Hom
return Hom(self, self).identity() |
comment:21
Replying to @simon-king-jena:
Hm. On second thought, do we really want that |
This comment has been minimized.
This comment has been minimized.
Changed author from Mike Hansen to Simon King |
comment:22
What do people think about the patch that I just attached? We now have
and used to have
Apply trac4740-cache_coerce_from_self.patch |
comment:23
PS: The memleak in the ticket description has already been fixed elsewhere, this is now only about efficiency. |
This comment has been minimized.
This comment has been minimized.
comment:24
It seems that the patchbot tries to apply both patches. Trying to get it right: Apply trac4740-cache_coerce_from_self.patch |
comment:25
For the record: All tests pass, and I really don't see why the patchbot is trying to apply two patches. |
comment:26
Your changes look good to me. I knew the patch I posted was probably dodgy, but you'd be the one who'd have the best grasp on it. Thanks! |
Reviewer: Mike Hansen |
Dependencies: #14519 |
Attachment: trac4740-cache_coerce_from_self.patch.gz Cache coercion from self to self |
comment:29
Done! The only change concerns the new syntax for debug options. I guess I may revert to "positive review". Apply trac4740-cache_coerce_from_self.patch |
Merged: sage-5.12.beta3 |
Burcin reported at #4639:
Since the patch by RobertWB at that ticket fixes the issue Burcin reported, but not the original one I am moving it over to this ticket.
Cheers,
Michael
Apply
attachment: trac4740-cache_coerce_from_self.patch
Depends on #14519
CC: @burcin @robertwb @simon-king-jena
Component: memleak
Author: Simon King
Reviewer: Mike Hansen
Merged: sage-5.12.beta3
Issue created by migration from https://trac.sagemath.org/ticket/4740
The text was updated successfully, but these errors were encountered: