docs icon indicating copy to clipboard operation
docs copied to clipboard

Explain how the object pool can improve performance

Open petk opened this issue 6 years ago • 1 comments

https://php.earth/docs/php/ref/oop/design-patterns/object-pool

petk avatar Jun 18 '18 07:06 petk

At https://sourcemaking.com/design_patterns/object_pool I read, "The Object Pool lets others "check out" objects from its pool, when those objects are no longer needed by their processes, they are returned to the pool in order to be reused.

However, we don't want a process to have to wait for a particular object to be released, so the Object Pool also instantiates new objects as they are required, but must also implement a facility to clean up unused objects periodically."

0xcrypto avatar Jun 18 '18 07:06 0xcrypto