Object pooling reduces the number of allocations, and therefore the number of garbage collections, required by an application.
对象池机制可以降低应用程序所需的分配的数量,从而降低应用程序所需的垃圾回收的数量。
Object pooling only helps reduce the memory required for class allocations and the time required for object creation and destruction.
对象池只是有助于减少类分配所需的内存以及对象创建和销毁所需的时间。
For example, object pooling reduces the amount of garbage generated by an application but can seriously hurt garbage collection performance.
例如,对象轮询会减少应用程序生成的垃圾数量,但严重降低了垃圾收集的性能。
Object pooling helps level out the number of allocations made on the heap, since the most common objects in an application can be pooled.
对象池机制有助于减小在堆上进行的分配的数量,因为可以汇聚应用程序中最常见的对象。
If your objects are not used with high frequency or do not have a high creation or destruction cost, then object pooling might not be the right strategy.
如果对象的使用频率不高,或者对象的创建或销毁成本不高,则对象池可能不是正确的策略。
What you don't see in Figure 3 is object pooling, automatic transaction processing, security, and all the other good things that EJB technology provides.
图3中没有看到的是对象池、自动事务处理、安全性以及EJB技术提供的所有其他好东西。
A lot of people are very enamored with object pooling, yet half the time people are not measuring to that to find out whether object pooling is any good.
很多人热衷于对象池,但起码有一半的情况下,人们并不去测量对象池的效果到底是好是坏。
Object constructors used in conjunction with object pooling provide the capabilities of a resource dispenser, without the effort of implementing a full resource dispenser.
与对象池一起使用的对象构造函数提供资源分配器的能力,无需实现完整的资源分配器。
Object pooling can offer a significant performance boost; it is most effective in situations where the cost of initializing a class instance is high, the rate of instantiation of a class is high.
运用对象池化技术可以显著地提升性能,尤其是当对象的初始化过程代价较大或者频率较高时。
For pooling any.net object, I thought it would be interesting to write a general-purpose object pool for this article.
为了汇集任何. NET对象,我认为针对本文编写一个通用的对象池会很有趣。
Connection pooling improves performance as a data source object creates a connection as soon as it is instantiate.
连接池可提高性能,因为一将数据源对象实例化,它就会创建一个连接。
Pooling is quite simple: an object is reused instead of allowing it to be reclaimed by the garbage collector.
池机制相当简单:对象被重新使用,而不是让它被垃圾回收器回收。
Caching and pooling can be helpful techniques to reduce temporary object creation.
缓存和对象池技术均可以减少临时对象的创建。
Similarly the application design can be tuned for performance: Fewer object creations, ongoing database refinements, and using database connection pooling.
同样地,应用程序设计也能调优性能:更少的对象创建、实时的数据库优化以及使用数据库连接池。
Object caching and pooling: the application server automatically pools stateless session beans at the server level, reducing the amount of time spent in object creation and garbage collection.
对象高速缓存和合用:应用程序服务器自动在服务器级合用无状态会话bean,这减少了花在对象创建和垃圾收集上的时间。
On my desktop machine, one million iterations takes about 12 seconds to complete. The pooling code avoids the allocation of the MyClass object within the loop
在我的桌面计算机上,一百万次迭代需要大约12秒钟才能完成。
On my desktop machine, one million iterations takes about 12 seconds to complete. The pooling code avoids the allocation of the MyClass object within the loop
在我的桌面计算机上,一百万次迭代需要大约12秒钟才能完成。
应用推荐