Godot 4.2.2 being very very slow

Godot Version

4.2.2

Question

I’ve been making a game in Godot for the last few weeks and it randomly started taking 5 minutes to load a scene when in the editor or to save changes. When the game is compiled to an exe its fine but trying to save my changes or load a scene to check my changes it is incredibly slow. It isn’t my computer as I’ve tried running it on a few computers with up to date drivers including one with a 4060. I saw a few suggestions in the forums like turning on running continuously or having one scene/script open at a time or even switching versions entirely. Any ideas on how to fix this?

What file size is the scene file you’re trying to load/save? If it’s huge (several MB or more), you likely saved binary resources as embedded within a text scene/resource. This is a slow process and makes the file much larger than if you saved that resource as an external binary resource (.res file instead of .tres or built-in to a .tscn file).

As a workaround, you can save the scene in question in the binary .scn format, but you’ll lose on the advantages of text-based scene files (which are more friendly to version control).

1 Like

Changing the settings under Texture in the node settings and it incredibly lowered the save and loading time but did not change how much space its taking up.
image

So looking at the files you’re right… but I’m confused as to why? The scene is taking about around 224 MB but is literally just a label and a button that closes the game when pressed, I have a different scene with 3 buttons and a label that takes up way less than this. Must say, very confused. (Image below is the 224 MB scene)

I suggest opening the scene file with a text editor (not all text editors will cope well with a file this large though…), so you can see what exactly is taking so much space.

My guess is that it’s (one or several) font files or textures being embedded in the scene file. It could also be due to an editor plugin packing its own data into the scene file for some reason.

Thank for your help and explanation :slight_smile:

Yup, completely fonts

2 Likes

I’m using custom fonts and I’m wondering if that’s something awaiting for me down the line.

Care to share some details? Like, how many fonts? Size of them? Etc.

1 font, (showed up as 2 in the file, bold and not bold) 123 or smth, and some labels some buttons. Was a very easy fix tho, just doing scene > Save as > res and then deleting the tres and making sure it loads the correct thing when you change scenes.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.