### 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
} 
			case HB_OT_NAME_ID_LIGHT_BACKGROUND: {
				name = "light_background_palette";
			} 
			case HB_OT_NAME_ID_DARK_BACKGROUND: {
				name = "dark_background_palette";
			} 
			case HB_OT_NAME_ID_VARIATIONS_PS_PREFIX: {
				name = "postscript_name_prefix";
			} 
			default: {
				name = vformat("unknown_%d", names[i].name_id);
			} 
		}
		String text;
		unsigned int text_size = hb_ot_name_get_utf32(hb_face, names[i].name_id, names[i].language, nullptr, nullptr) + 1;
		text.resize(text_size);
		hb_ot_name_get_utf32(hb_face, names[i].name_id, names[i].language, &text_size, (uint32_t *)text.ptrw());
		if (!text.is_empty()) {
			Dictionary &id_string = names_for_lang[String(hb_language_to_string(names[i].language))];
			id_string[name] = text;
		}
	}
	Dictionary out;
	for (const KeyValue<String, Dictionary> &E : names_for_lang) {
		out[E.key] = E.value;
	}
	return out;
}
void TextServerAdvanced::_font_set_antialiasing(const RID &p_font_rid, TextServer::FontAntialiasing p_antialiasing) {