I use the
CanvasItem draw-Calls to draw stuff - which I know is slow. But I don’t need to draw things that often and at the time when I draw them, the corresponding node is not visible on the screen anyway. So this does not need to be fast.
What is the recommended way of doing a task like this “in the background” without slowing down the main loop of the game? Threads (is this safe?)? Is there some other way to do stuff only when the engine is not busy with something else?