### 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);
	return TS->font_get_script_support_override(cache[0], p_script);
}
void FontFile::remove_script_support_override(const String &p_script) {
	_ensure_rid(0);
	TS->font_remove_script_support_override(cache[0], p_script);
}
Vector<String> FontFile::get_script_support_overrides() const {
	_ensure_rid(0);
	return TS->font_get_script_support_overrides(cache[0]);
}
void FontFile::set_opentype_feature_overrides(const Dictionary &p_overrides) {
	_ensure_rid(0);
	TS->font_set_opentype_feature_overrides(cache[0], p_overrides);
}
Dictionary FontFile::get_opentype_feature_overrides() const {
	_ensure_rid(0);
	return TS->font_get_opentype_feature_overrides(cache[0]);
}
int32_t FontFile::get_glyph_index(int p_size, char32_t p_char, char32_t p_variation_selector) const {
	_ensure_rid(0);
	return TS->font_get_glyph_index(cache[0], p_size, p_char, p_variation_selector);
}
char32_t FontFile::get_char_from_glyph_index(int p_size, int32_t p_glyph_index) const {
	_ensure_rid(0);
	return TS->font_get_char_from_glyph_index(cache[0], p_size, p_glyph_index);
}
FontFile::FontFile() {
}
FontFile::~FontFile() {