[issue44421] random.uniform() hangs will eating up all available RAM

Jack DeVries report at bugs.python.org
Mon Jun 14 15:41:38 EDT 2021


Jack DeVries <jdevries3133 at gmail.com> added the comment:

This doesn't look like a bug. It's hard to disentangle what your code is doing, exactly, but it's most likely that between all your nested loops and classes initializing each other, there is an exponential or greater growth in time complexity happening. As your input values grow, the program slows down at an exponential rate until it appears to just "hang".

The RAM is growing because the program hasn't really stopped running, it's just dutifully chugging along and filling up more and more memory, and if you waited long enough the program would either crash having run out of memory or maybe the program would complete in a very, very long time.

I hope I'm not missing something; feel free to let me know, or share a more minimal example to reproduce the issue.

----------
nosy: +jack__d

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44421>
_______________________________________


More information about the Python-bugs-list mailing list