Features:

  •  Easy to use in C++ and BP
  • Uses a set of initialized objects kept ready to use – a “pool” – rather than allocating and destroying them on demand
  •  World pools settings
  •  Performance
  • Easy implemented in any project

Code Module:

  •  “Name”: “ObjectPool”, “Type”: “Runtime”, “LoadingPhase”: “PreDefault”

Number of Blueprints: 0

Number of C++ Classes: 5

Network Replicated: Yes

Supported Development Platforms: Win64, Win32, MacOS, Linux, PS4, XB-ONE, iOS, Android, Steam VR, Gear VR, Oculus, HoloLens

Supported Target Build Platforms: Win64, Win32, MacOS, Linux, PS4, XB-ONE, iOS, Android, Steam VR, Gear VR, Oculus, HoloLens

Documentation/usage: https://youtu.be/cCQhsnOKCnE

Discord: https://discord.gg/XVpxaKbJgV

特征:

  •  易于使用 C++英国石油公司
  • 使用一组随时可用的初始化对象–一个”池” – 而不是按需分配和销毁它们
  •  世界池设置
  •  工作表现
  • 易于在任何项目中实施

代码模块:

  •  “Name”:”ObjectPool”,”Type”:”Runtime”,”LoadingPhase”:”PreDefault”

蓝图数目:0

C++类数:5

网络复制:是

支持的开发平台: Win64,Win32,MacOS,Linux,PS4,XB-ONE,iOS,Android,Steam VR,Gear VR,Oculus,HoloLens

支持的目标构建平台: Win64,Win32,MacOS,Linux,PS4,XB-ONE,iOS,Android,Steam VR,Gear VR,Oculus,HoloLens

文档/使用: https://youtu.be/cCQhsnOKCnE

不和谐: https://discord.gg/XVpxaKbJgV











IS NOT UPDATEDLinks for videos:

Practical usage of Blueprint: https://youtu.be/cCQhsnOKCnE

Benefits

Object pooling can offer a significant performance boost in situations where the cost of initializing a class instance is high and the rate of instantiation and destruction of a class is high – in this case objects can frequently be reused, and each reuse saves a significant amount of time. Object pooling requires resources – memory and possibly other resources, such as network sockets, and thus it is preferable that the number of instances in use at any one time is low, but this is not required.

The pooled object is obtained in predictable time when creation of the new objects (especially over network) may take variable time. 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 other situations, simple object pooling (that hold no external resources, but only occupy memory) may not be efficient and could decrease performance. In case of simple memory pooling, the slab allocation memory management technique is more suited, as the only goal is to minimize the cost of memory allocation and deallocation by reducing fragmentation.

未更新视频链接:

蓝图的实际使用: https://youtu.be/cCQhsnOKCnE

好处

在初始化类实例的成本很高、类的实例化和销毁率很高的情况下,对象池可以提供显着的性能提升–在这种情况下,对象可以经常被重用,每次重用都节省了大量的时间。 对象池需要资源-内存和可能的其他资源,例如网络套接字,因此最好在任何一个时间使用的实例数量都很低,但这不是必需的。

当创建新对象(特别是通过网络)可能需要可变的时间时,池化对象是在可预测的时间内获得的。 这些好处主要适用于时间昂贵的对象,如数据库连接、套接字连接、线程和大型图形对象(如字体或位图)。

在其他情况下,简单的对象池(不包含外部资源,但只占用内存)可能效率不高,并可能降低性能。 对于简单的内存池,slab分配内存管理技术更适合,因为唯一的目标是通过减少碎片来最大限度地降低内存分配和解除分配的成本。

声明:本站所有资源都是由站长从网络上收集而来,如若本站内容侵犯了原著者的合法权益,可联系站长删除。