### 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
_ensure_rid(0);
	TS->font_set_name(cache[0], p_name);
}
void FontFile::set_font_style_name(const String &p_name) {
	_ensure_rid(0);
	TS->font_set_style_name(cache[0], p_name);
}
void FontFile::set_font_style(BitField<TextServer::FontStyle> p_style) {
	_ensure_rid(0);
	TS->font_set_style(cache[0], p_style);
}
void FontFile::set_font_weight(int p_weight) {
	_ensure_rid(0);
	TS->font_set_weight(cache[0], p_weight);
}
void FontFile::set_font_stretch(int p_stretch) {
	_ensure_rid(0);
	TS->font_set_stretch(cache[0], p_stretch);
}
void FontFile::set_antialiasing(TextServer::FontAntialiasing p_antialiasing) {
	if (antialiasing != p_antialiasing) {
		antialiasing = p_antialiasing;
		for (int i = 0; i < cache.size(); i++) {
			_ensure_rid(i);
			TS->font_set_antialiasing(cache[i], antialiasing);
		}
		emit_changed();
	}
}
TextServer::FontAntialiasing FontFile::get_antialiasing() const {