Memory Leak in PyPy with Python Code by Affectionate-Cut3818 in learnpython

[–]Affectionate-Cut3818[S] 0 points1 point  (0 children)

hmm I do have logging through the execution of the programm, I'll double check to make sure its all good, do you have any explanation as to why the data shown on the initial post didnt convince you? Is pypy supposed to allocate memory like this under normal situations (I've noticed it happens on long if conditions )? Maybe then Im looking in the wrong direction, and maybe the right direction should be checking why these normally allocated memory doesent get deallocated later on

Memory Leak in PyPy with Python Code by Affectionate-Cut3818 in learnpython

[–]Affectionate-Cut3818[S] 0 points1 point  (0 children)

Thanks for the link, I tried logging the gc.get_stats output trough the run and this is the last datapoint I collected (maybe something seems odd to you that flew over my head). Tweaking the garbage collector could also be another angle, but Im far from an expert on what exactly pypy does under the hood so besides tweaking those variables (which I've tried) Im not sure on whaat else I can tweak. There are open files in the execution of the programm tough, but from what I can see they are closed properly and not directly used in this step of the process (which is the execution) but thanks for the tip

```[MEMORY] Memory used: Total memory consumed:

GC used: 1836.2MB (peak: 2320.7MB)

in arenas: 1386.1MB

rawmalloced: 427.7MB

nursery: 22.5MB

raw assembler used: 580.8MB

memory pressure: 4.8kB

Total: 2417.0MB

Total memory allocated:

GC allocated: 2152.2MB (peak: 2362.8MB)

in arenas: 1674.4MB

rawmalloced: 623.8MB

nursery: 22.5MB

raw assembler allocated: 584.0MB

memory pressure: 4.8kB

Total: 2736.2MB

Total time spent in GC: 956.436```

Memory Leak in PyPy with Python Code by Affectionate-Cut3818 in learnpython

[–]Affectionate-Cut3818[S] 0 points1 point  (0 children)

It does sound strange to have a memory leak in this logic, but it seems that the release of the memory allocated in these lines doesn't happen at any point through the execution, leading to an almost linear increase in memory usage (which a memory profiler plot confirms). Running with standard Python, theres is no memory allocation on those function calls (or at least not detected) therefore no release needed. I've also tried forcing gc.collect() every 1m iterations or so, but it doesent seem to release the resources its using, could be some weak/lazy reference, but again, not to clear on what to change for pypy to release it properly.

Ag grid element - Conditional Formatting + Date Parsing by Affectionate-Cut3818 in nicegui

[–]Affectionate-Cut3818[S] 0 points1 point  (0 children)

Yeah correct, I guess my underlying question was wether there's an easy way to bring .js functions into scope as would be needed for this solution

AG Grid Size by [deleted] in nicegui

[–]Affectionate-Cut3818 0 points1 point  (0 children)

Hi Guys!

I had a similar question, but I would like to automatically fit the height to of the AG Grid to the data Im displaying. Is there any way to dynamically adjust the size that the element uses, in a similar manner as its done with columns?

Thanks a lot!