### 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
}
						if (U_FAILURE(err)) {
							ubidi_close(bidi_iter);
							bidi_iter = nullptr;
							ERR_PRINT(vformat("BiDi reordering for the line failed: %s", u_errorName(err)));
						}
					}
				} else {
					bidi_iter = nullptr;
					ERR_PRINT(vformat("BiDi iterator allocation for the line failed: %s", u_errorName(err)));
				}
			}
			p_new_sd->bidi_iter.push_back(bidi_iter);
			err = U_ZERO_ERROR;
			int bidi_run_count = 1;
			if (bidi_iter) {
				bidi_run_count = ubidi_countRuns(bidi_iter, &err);
				if (U_FAILURE(err)) {
					ERR_PRINT(u_errorName(err));
				}
			}
			for (int i = 0; i < bidi_run_count; i++) {
				int32_t _bidi_run_start = 0;
				int32_t _bidi_run_length = end - start;
				if (bidi_iter) {
					ubidi_getVisualRun(bidi_iter, i, &_bidi_run_start, &_bidi_run_length);
				}
				int32_t bidi_run_start = _convert_pos(p_sd, ov_start + start + _bidi_run_start);
				int32_t bidi_run_end = _convert_pos(p_sd, ov_start + start + _bidi_run_start + _bidi_run_length);
				for (int j = 0; j < sd_size; j++) {