### 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
}
bool TextServerAdvanced::_spoof_check(const String &p_string) const {
#ifndef ICU_STATIC_DATA
	if (!icu_data_loaded) {
		return false;
	}
#endif
	UErrorCode status = U_ZERO_ERROR;
	Char16String utf16 = p_string.utf16();
	if (allowed == nullptr) {
		allowed = uset_openEmpty();
		uset_addAll(allowed, uspoof_getRecommendedSet(&status));
		uset_addAll(allowed, uspoof_getInclusionSet(&status));
	}
	if (sc_spoof == nullptr) {
		sc_spoof = uspoof_open(&status);
		uspoof_setAllowedChars(sc_spoof, allowed, &status);
		uspoof_setRestrictionLevel(sc_spoof, USPOOF_MODERATELY_RESTRICTIVE);
	}
	int32_t bitmask = uspoof_check(sc_spoof, utf16.get_data(), -1, NULL, &status);
	ERR_FAIL_COND_V_MSG(U_FAILURE(status), false, u_errorName(status));
	return (bitmask != 0);
}
String TextServerAdvanced::_strip_diacritics(const String &p_string) const {
#ifndef ICU_STATIC_DATA
	if (!icu_data_loaded) {
		return TextServer::strip_diacritics(p_string);
	}
#endif
	UErrorCode err = U_ZERO_ERROR;