Hacker News new | ask | show | jobs
by DangerousPie 4223 days ago
Interesting. I was looking at the comments hoping for some more technical background, but unfortunately they seem to have been run over by the animated gif crowd.

Any more details on this?

3 comments

It seems when you start to hit the memory limit PHP's automatic garbage collection will loop through the constructed objects to see if any can be cleaned up.

If none can (and in the case of Composer all the objects exist for a reason) then it's wasting time analysing the objects.

So in this case there's only a large waste of cpu doing nothing with gc enabled.

Well, yes and no, since some of the reports show an increase in memory usage, so the gc was doing something.
Most reports don't show significantly changed memory usage though (some increase slightly, others decrease slightly).
I think the article on this, explains why a memory reduction by garbage collection also increases execution speed: http://derickrethans.nl/collecting-garbage-performance-consi...