# 
msgid ""
msgstr ""
"Project-Id-Version: DesignPatternsPHP 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-29 12:18+0200\n"
"PO-Revision-Date: 2022-01-07 15:00+0800\n"
"Last-Translator: Aspirant Zhang <admin@aspirantzhang.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"

#: ../../Creational/Pool/README.rst:2
msgid "`Pool`__"
msgstr "对象池"

#: ../../Creational/Pool/README.rst:4
msgid ""
"The **object pool pattern** is a software creational design pattern that "
"uses a set of initialized objects kept ready to use – a \"pool\" – rather "
"than allocating and destroying them on demand. A client of the pool will "
"request an object from the pool and perform operations on the returned "
"object. When the client has finished, it returns the object, which is a "
"specific type of factory object, to the pool rather than destroying it."
msgstr ""
"**对象池设计模式** 是一种创建型设计模式。它使用一组提前已准备完成可以使用的对象，而不是根据需要分配或销毁。这种来源被称为：“池”（pool）。"
"池的使用者将从池中请求一个对象，并对返回的对象进行操作。"
"在客户端处理完成后，它将返回一种特定类型的工厂对象。返回给池，而不是销毁。"

#: ../../Creational/Pool/README.rst:11
msgid ""
"Object pooling can offer a significant performance boost in situations where"
" the cost of initializing a class instance is high, the rate of "
"instantiation of a class is high, and the number of instances in use at any "
"one time is low. The pooled object is obtained in predictable time when "
"creation of the new objects (especially over network) may take variable "
"time."
msgstr ""
"对象池模式在一些情景下可以带来明显的性能提升。如：类实例初始化成本较高、类的实例化率较高、或类实例同时使用率不高的情况下。"
"当创建新对象（尤其是通过网络）的时间花费不确定时，池对象的获得时间却是可预测的。"


#: ../../Creational/Pool/README.rst:18
msgid ""
"However these benefits are mostly true for objects that are expensive with "
"respect to time, such as database connections, socket connections, threads "
"and large graphic objects like fonts or bitmaps. In certain situations, "
"simple object pooling (that hold no external resources, but only occupy "
"memory) may not be efficient and could decrease performance."
msgstr ""
"这些优点对于时间要求敏感的对象来说，是非常有用的。"
"例如：数据库连接、套接字连接、线程和大型图形对象（如字体或位图）。"
"但在某些情况下，简单的对象池（不包含外部资源，只占用内存）可能效率不高，并且会降低性能。"

#: ../../Creational/Pool/README.rst:25
msgid "UML Diagram"
msgstr "UML 图"

#: ../../Creational/Pool/README.rst:32
msgid "Code"
msgstr "代码"

#: ../../Creational/Pool/README.rst:34
msgid "You can also find this code on `GitHub`_"
msgstr "你可以在 `GitHub`_ 上找到这些代码"

#: ../../Creational/Pool/README.rst:55
msgid "Test"
msgstr "测试"
