### 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
#endif 
	if (tokens.size() == 2 && tokens[0] == "language_support_override") {
		String lang_code = tokens[1];
		set_language_support_override(lang_code, p_value);
		return true;
	} else if (tokens.size() == 2 && tokens[0] == "script_support_override") {
		String script_code = tokens[1];
		set_script_support_override(script_code, p_value);
		return true;
	} else if (tokens.size() >= 3 && tokens[0] == "cache") {
		int cache_index = tokens[1].to_int();
		if (tokens.size() == 3 && tokens[2] == "variation_coordinates") {
			set_variation_coordinates(cache_index, p_value);
			return true;
		} else if (tokens.size() == 3 && tokens[2] == "embolden") {
			set_embolden(cache_index, p_value);
			return true;
		} else if (tokens.size() == 3 && tokens[2] == "face_index") {
			set_face_index(cache_index, p_value);
			return true;
		} else if (tokens.size() == 3 && tokens[2] == "transform") {
			set_transform(cache_index, p_value);
			return true;
		} else if (tokens.size() == 3 && tokens[2] == "spacing_top") {
			set_extra_spacing(cache_index, TextServer::SPACING_TOP, p_value);
			return true;
		} else if (tokens.size() == 3 && tokens[2] == "spacing_bottom") {
			set_extra_spacing(cache_index, TextServer::SPACING_BOTTOM, p_value);
			return true;
		} else if (tokens.size() == 3 && tokens[2] == "spacing_space") {