Re: [sage-devel] Re: Memory leak in `NumberField().class_group().order()`

2024-09-08 Thread Marc Culler
I agree that this is a bug. I do not think it is the same issue as the leak you reported involving elliptic curves. The reason I don't think so is that it is possible to compute class numbers with no memory leak using the PARI getno function in either cypari or cypari 2. There are many thing

Re: [sage-devel] Re: Memory leak in `NumberField().class_group().order()`

2024-09-08 Thread Marc Culler
Below is evidence (again) that the "leak" you are reporting is actually caused by caching NumberField objects or related data. You can see that when a calculation using a certain NumberField is repeated it does not increase the size of the PARI heap, although the first time that the calculati

[sage-devel] Re: Memory leak in `NumberField().class_group().order()`

2024-09-08 Thread Nils Bruin
This example is definitely leaving loads of stuff on the python heap, so if there is a leak onto the cython heap then it is not the only one. My guess would be an interaction with the coercion system or UniqueRepresentation, which both keeps global weak references to objects. If the key informat

Re: [sage-devel] Re: Memory leak in `NumberField().class_group().order()`

2024-09-08 Thread Dima Pasechnik
Can this be reproduced in plain Python with cypari2 installed? One would need to replace the call to NumberField with the corresponding cypari2 equivalent. This would at least tell whether it's a leak in cypari2, or not. Dima On 8 September 2024 17:03:54 BST, Nils Bruin wrote: >This examp

Re: [sage-devel] Re: Memory leak in `NumberField().class_group().order()`

2024-09-08 Thread Marc Culler
As I said above this does not happen with either cypari or cypari2 when using getno. This is not a cypari issue. The issue is that Sage creates a "unique" object for each new number field, where new means that the input parameters for the NumberField function have not been used before. The number

Re: [sage-devel] Re: Memory leak in `NumberField().class_group().order()`

2024-09-08 Thread Dima Pasechnik
I'd say that, normally speaking, a cache is something of limited size, and managed - once it is full, the least used objects are removed to make room for new objects. I don't know if there are CASs which use such a design. An unlimited size cache is easier and more efficient - as long as you have

Re: [sage-devel] Re: Memory leak in `NumberField().class_group().order()`

2024-09-08 Thread Nils Bruin
On Sunday 8 September 2024 at 13:18:40 UTC-7 marc@gmail.com wrote: As I said above this does not happen with either cypari or cypari2 when using getno. This is not a cypari issue. The issue is that Sage creates a "unique" object for each new number field, where new means that the input par

[sage-devel] Re: Policy discussion about blocking others on Github

2024-09-08 Thread Kwankyu Lee
All mentions of "SageMath" seem redundant and may be removed from the paragraph. ... If the blocked person does not cooperate, the committee may sanction them. "them" -> "him or her". What is the possible sanction? I think the content of the sanction should be explicit and actionable as t

[sage-devel] Re: Policy discussion about blocking others on Github

2024-09-08 Thread John H Palmieri
(a) Your point about "SageMath" being redundant is a good one. (b) Some people do not use either pronoun "him" or "her", and so "them" covers more options. (The use of "they/them" as a generic singular pronoun is common, at least in US academic settings.) (c) I think that the sanctions should de

[sage-devel] Re: Policy discussion about blocking others on Github

2024-09-08 Thread Kwankyu Lee
Thank John for the response. I have other questions in https://groups.google.com/g/sage-devel/c/cLnRyofH0lw/m/S__tbpV1AgAJ. They are about the period during which the blocking is effective. As the proposed policy from CoCC is about the resolution of the blocking, I think the policy should be s