运用对象池化技术可以显著地提升性能,尤其是当对象的初始化过程代价较大或者频率较高时。
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.
资源管理器实现了对象池,它能够获得实现持久化、安全性状态管理和事务的托管资源模式。
The resource manager implements the object pool and it gets the managed resource that implements persistence, security state management, and transaction.
连接池可提高性能,因为一将数据源对象实例化,它就会创建一个连接。
Connection pooling improves performance as a data source object creates a connection as soon as it is instantiate.
在使用对象池时,分配、初始化、回收和终结只发生一次,从而减少了内存使用和所需的处理时间。
When using an object pool, the allocation, initialization, collection, and finalization only occur once, reducing both the memory usage and the processing time that is required.
在测试中实例化数据池对象。
在测试中实例化数据池对象。
应用推荐