### 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
#ifndef ICU_STATIC_DATA
	if (!icu_data_loaded) {
		return p_string.to_lower();
	}
#endif
	if (p_string.is_empty()) {
		return p_string;
	}
	const String lang = (p_language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
	// Convert to UTF-16.
	Char16String utf16 = p_string.utf16();
	Vector<char16_t> lower;
	UErrorCode err = U_ZERO_ERROR;
	int32_t len = u_strToLower(nullptr, 0, utf16.get_data(), -1, lang.arr);
	ERR_FAIL_COND_V_MSG(err != U_BUFFER_OVERFLOW_ERROR, p_string, u_errorName(err));
	lower.resize(len);
	err = U_ZERO_ERROR;
	u_strToLower(lower.ptrw(), len, utf16.get_data(), -1, lang.arr);
	ERR_FAIL_COND_V_MSG(U_FAILURE(err), p_string, u_errorName(err));
	// Convert back to UTF-32.
	return String::utf16(lower.ptr(), len);
}
PackedInt32Array TextServerAdvanced::_string_get_word_breaks(const String &p_string, const String &p_language, int64_ {