Hacker News new | ask | show | jobs
by daveid 4219 days ago
Garbage collection is slow, but reduces memory usage. So disabling it costs memory. Also, Composer does not keep running, once the job is done, the script terminates, so you don't have to enable GC back again (it's only disabled in the context of the current execution).
1 comments

> Garbage collection is slow, but reduces memory usage

Note that it's only reducing memory usage if there are cycles. The rest will be collected when the refcount falls to 0.