Frame drop every second

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

Why does Godot seem to drop 1 frame per second? I have a simple project that just shows the accumulated time when the rate drops. It’s 2d, with a label and the following code:

extends Node2D

# class member variables go here, for example:
# var a = 2
# var b = "textvar"
var totTime = 0

func _ready():
	# Called when the node is added to the scene for the first time.
	# Initialization here

func _process(delta):
#	# Called every frame. Delta is time since last frame.
#	# Update game logic here.

	totTime += delta
	if delta > 0.02:
		$Label1.text = str(totTime)

Almost exactly every second, the rate drops (so the fps drops to about 30 briefly).
I’ve tried exporting without debug - no change.

Do you have remote scene tree selected in the editor when you run the game?

Zylann | 2018-07-16 12:55

Thanks for the reply. No (if you mean is auto switch on), and I tried changing the refresh interval anyway - no change.
The exported .exe+pck do it on serveral differnet PCs. I also exported to a mac - it doesn’t happen regularly this (maybe once every 3 minutes)

percy1000 | 2018-07-16 13:12

:bust_in_silhouette: Reply From: golpebaixo

I tested on the mono version and got some drops but not as often.

Using that version should not make any difference.

Zylann | 2018-07-16 12:56

it drops like 3 times right when the game starts then only when I move/minimize the game window or some other app eats more CPU.

It’s still weird because the game barely uses any CPU power.

golpebaixo | 2018-07-16 13:38