### 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
return TS->font_is_language_supported(_get_rid(), p_language);
}
bool Font::is_script_supported(const String &p_script) const {
	return TS->font_is_script_supported(_get_rid(), p_script);
}
Dictionary Font::get_supported_feature_list() const {
	return TS->font_supported_feature_list(_get_rid());
}
Dictionary Font::get_supported_variation_list() const {
	return TS->font_supported_variation_list(_get_rid());
}
int64_t Font::get_face_count() const {
	return TS->font_get_face_count(_get_rid());
}
Font::Font() {
	cache.set_capacity(64);
	cache_wrap.set_capacity(16);
}
Font::~Font() {
}
_FORCE_INLINE_ void FontFile::_clear_cache() {
	for (int i = 0; i < cache.size(); i++) {
		if (cache[i].is_valid()) {
			TS->free_rid(cache[i]);
			cache.write[i] = RID();
		}
	}
}
_FORCE_INLINE_ void FontFile::_ensure_rid(int p_cache_index) const {