Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a very interesting approach, what happened with memory footprint when you did this?


Thanks, don't think I saw much impact at all in aggregate - our memory consumption on these web servers were dominated by objects we intentionally stored per request or globally, and not temporary/unreferenced python objects.


Even while GC is delayed Python (CPython at least) will free some stuff through reference counting. Only circularly referenced stuff should stick around until the next GC run. So that can avoid lots of stack temporaries and stuff.


Theoretically with your code structured right you can disable the cyclical garbage collector outright: It only deals with reference cycles which you can explicitly avoid by using the weakref module.

Not entirely sure how you'd go about writing code like that, but it's possible.


Nice! I'll have to give this a try at some point if I run into GC related latency issues and see if it works on my systems.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: