OK, so we are developing an network related application where the user can upload their own python scripts to decide for an algorithm. Our code contains c and cython and python modules.
Since avoiding latency, memory footprint and minimal processing is critical for us, we were wondering if it's a wise and effective (performance wise) to turn off garbage collection and handle memory deallocation ourselves.
Just let the language do what it wants to do, and if you find you have an actual problem, come on back and post about it. Otherwise it's premature optimization.
gc.disable
only turns off the cyclic garbage collector. Objects will still be collected when the refcount drops to zero anyway. So unless you have a lot of cyclic references, it will make no difference.
Are you are talking about doing a customised Python build and disabling the ref counting GC?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With