rbfx
rbfx copied to clipboard
Performance issue: CreateComponent<T>
Hello,
I have now ported my complete game from UrhoSharp to rbfx. Everything is now working so far. Thanks for the great work to rbfx!
But I have now encountered a performance problem that did not occur with UrhoSharp. The CreateComponent<T> function takes on average 15ms on an older Android device. Even if only the UpdateEventMask is set in the component constructor.
Example:
node.CreateComponent<BulletComponent>();
public class BulletComponent : BaseComponent
{
public BulletComponent(Context context) : base(context)
{
}
}
[ObjectFactory]
public abstract class BaseComponent : LogicComponent
{
public BaseComponent(Context context) : base(context)
{
UpdateEventMask = UpdateEvent.UseUpdate;
}
}