If I have my HUD set to the default blank HUD, everything works fine. If I create a new HUD and put this:
(The widget draws a health bar, connected to a simple interface to pass the health value)
With this new HUD my frame rate drops considerably, maybe half.
I should also add that I only have engine version 4.3, so the widget thing is still experimental.
Event Receive Draw HUD is part of the old UI system, and it’s constantly called, so with your setup you’re creating loads of widgets and adding them to the viewport. Hence the slowdown.
I don’t remember exactly how it worked in the 4.3 version, but you should typically only create the widget once, then add it to the viewport (once). Do this from one of your framework classes when the game starts.