### 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 fonts_no_match;
							int font_count = span.fonts.size();
							if (font_count > 0) {
								fonts.push_back(sd->spans[k].fonts[0]);
							}
							for (int l = 1; l < font_count; l++) {
								if (_font_is_script_supported(span.fonts[l], script_code)) {
									if (_font_is_language_supported(span.fonts[l], span.language)) {
										fonts.push_back(sd->spans[k].fonts[l]);
									} else {
										fonts_scr_only.push_back(sd->spans[k].fonts[l]);
									}
								} else {
									fonts_no_match.push_back(sd->spans[k].fonts[l]);
								}
							}
							fonts.append_array(fonts_scr_only);
							fonts.append_array(fonts_no_match);
							_shape_run(sd, MAX(sd->spans[k].start - sd->start, script_run_start), MIN(sd->spans[k].end - sd->start, script_run_end), sd->script_iter->script_ranges[j].script, bidi_run_direction, fonts, k, 0, 0, 0);
						}
					}
				}
			}
		}
	}
	_realign(sd);
	sd->valid = true;
	return sd->valid;
}
bool TextServerAdvanced::_shaped_text_is_ready(const RID &p_shaped) const {