### Godot version

8449592d92eaeef990f5502b419d491ee3eeb7a6

### System information

Windows 11

### Issue description

Zooming in the script editor on an empty script freezes the entire editor for a few seconds, but if the file is large then it freezes for 4-5 seconds (which is unacceptable). Looks like a recent regression.

### Steps to reproduce

Just zoom in/out on the large script file.

### Minimal reproduction project

N/A
encoding = 6;
						} else if (encoding_name == "BALTIC") {
							encoding = 7;
						} else if (encoding_name == "EASTEUROPE") {
							encoding = 0;
						} else if (encoding_name == "GREEK") {
							encoding = 3;
						} else if (encoding_name == "HEBREW") {
							encoding = 5;
						} else if (encoding_name == "RUSSIAN") {
							encoding = 1;
						} else if (encoding_name == "TURKISH") {
							encoding = 4;
						} else if (encoding_name == "VIETNAMESE") {
							encoding = 8;
						} else {
							WARN_PRINT(vformat("Unknown BMFont OEM encoding %s, parsing as Unicode (should be ANSI, ASCII, ARABIC, BALTIC, EASTEUROPE, GREEK, HEBREW, RUSSIAN, TURKISH or VIETNAMESE).", encoding_name));
						}
					} else {
						encoding = 2;
					}
				}
				set_fixed_size(base_size);
			} else if (type == "common") {
				if (keys.has("lineHeight")) {
					height = keys["lineHeight"].to_int();
				}
				if (keys.has("base")) {
					ascent = keys["base"].to_int();
				}