-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use object pooling #1500
Comments
Excessive creation and destruction of Solution: Leveraging Unreal Engine's Built-in Pooling Mechanisms Unreal Engine provides robust pooling mechanisms that can effectively address this memory issue. By utilizing these features, you can significantly reduce the creation and destruction of objects, improving performance and memory efficiency. Key Points:
Additional Considerations:
By effectively utilizing Unreal Engine's built-in pooling mechanisms, you can significantly mitigate memory issues and improve the performance of your application. |
@spikhoff that reads as AI generated (my apologies if I'm mistaken, but references to "your specific application" jump out at me), but it's a reasonable summary nonetheless. Unreal may already have an object pool of some sort, so I'd look for that before implementing something like the |
Hey @kring and folks, Just wanted to give a heads-up about the recent post. I've been hacking away at it, and to be honest, I've been using some AI tools to help out here and there. I know some of you might be raising an eyebrow at that, but trust me, it's not about replacing human ingenuity. It's about being efficient and trying out new stuff. I've been keeping a close eye on the AI-generated stuff and making sure it fits in with what we're doing here. If you have any questions or think something's off, don't hesitate to shout. This is all about open communication and transparency. |
Ok, thanks for the heads up @spikhoff. For the development we do ourselves, we currently have a policy against using code-writing AI tools. Not because we're worried about it replacing human ingenuity, but because the ownership (copyright) of the resulting code is still at least a little bit uncertain. We want people to be able to rely on our open source products in a wide variety of circumstances, so we are very cautious about this kind of thing. I'm not currently certain if and how that policy applies to external contributions, given that such contributions are covered by the Contributor License Agreement, but am trying to find out. |
Hey @kring, Thanks for bringing up the AI tool policy. It's a good point to consider. Copyright can be a bit of a pain, especially in open source. Ultimately, the decision on whether to allow AI-generated code in contributions is up to the project community. If there are legal concerns, we need clear rules to keep things running smoothly. |
We currently create and destroy numerous
CesiumGltfComponent
s andUMaterialInstanceDynamic
objects throughout the lifetime of the program. Unfortunately, this accumulates in a large use ofFName
s over time (and potentially other performance / memory drawbacks we have not yet discovered). This was partially solved in #1423, but theFName
out-of-memory crash can still happen even after this fix, as noted on the forum.The real solution would be to create and use object pools. Beyond materials, this could be beneficial for components or meshes, too. That way, we can avoid infinitely accumulating
FName
objects.The text was updated successfully, but these errors were encountered: