### 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
Array keys = p_source.keys();
	Array values = p_source.values();
	for (int i = 0; i < keys.size(); i++) {
		int32_t value = values[i];
		if (value >= 0) {
			hb_feature_t feature;
			if (keys[i].get_type() == Variant::STRING) {
				feature.tag = _name_to_tag(keys[i]);
			} else {
				feature.tag = keys[i];
			}
			feature.value = value;
			feature.start = 0;
			feature.end = -1;
			r_ftrs.push_back(feature);
		}
	}
}
void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_start, int64_t p_end, hb_script_t p_script, hb_direction_t p_direction, TypedArray<RID> p_fonts, int64_t p_span, int64_t p_fb_index, int64_t p_prev_start, int64_t p_prev_end) {