-
-
Notifications
You must be signed in to change notification settings - Fork 579
Description
Hello,
I'm currently using Sol to create a view into my ECS, doing this creates a callback from C++ and uses sol:make_object every time a component is requested from an entity. Right is this sol:make_object is my largest bottleneck just simply due to the potential for there to be thousands of these calls per frame. Using a sol:function to create the Lua function callback, and then another function to retrieve the component from the entity (which is my bottleneck due to constructing the sol:object every request)
I'm mostly just wondering if this is the normal workflow, if constructing these sol:objects every time I want to grab the component from C++ into Lua, or if I'm supposed to be creating the object once and keeping it on the component. Even if there could be thousands of these components active at a time.
I'd love some feedback on the proper way to handle this!
Thanks again!