disable a 'Control' nodes event processing?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Aarstad

Hey guys, so I am trying to run a godot game on very modest hardware, and have noticed that if i overuse nodes that extends the “Control” node, I get bad performance really fast.

If i use a Node2D node, there’s no problem.

Thing is, I really want to have a label on top of a sprite, but I don’t want that the label is processing inputs, events or whatever it is doing that is causing this performance penalty.

Even though i try this:

for i in range(1, 251):
  var label = Label.new()
  add_child(label)
  label.set_process_input(false)
  label.set_process_unhandled_input(false)
  label.set_process(false)

I still get the performance penalty! Is there any way to get a control node label to render text on screen without it doing some magic that causes this penalty?

How many of these labels are you instancing?
An alternative would be to use draw_text CanvasItem — Godot Engine (3.0) documentation in English

Zylann | 2018-06-21 17:56