apispec icon indicating copy to clipboard operation
apispec copied to clipboard

deepupdate change recursion to loop

Open lucasfcnunes opened this issue 4 years ago • 2 comments

Solves RecursionErrors exceptions/crashes caused by bloated memory use or high recursion depth when calling deepupdate(). *The same issues can occur on copy.deepcopy() calls.

lucasfcnunes avatar Jan 12 '21 00:01 lucasfcnunes

Do you have a real life use case where the update process significantly eats up the memory to a point where the app crashes?

Or is this more of a theoretical issue?

lafrech avatar Jan 12 '21 08:01 lafrech

oh, i did. at the time of this commit i was actually facing this issue

i was recursively building an api spec using a web scraping engine i tried running it on a new async thread to tweak the python stack parameters, but i ended up having real seg faults/core dumps

lucasfcnunes avatar Mar 18 '21 20:03 lucasfcnunes