### 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
}
			} 
			default:
				
		}
		if (A1_sequenc == SEQ_NOT_STARTED) {
			if (jt == U_JT_LEFT_JOINING || jt == U_JT_DUAL_JOINING) {
				A1_sequenc = SEQ_STARTED;
				A1_scr = scr;
			}
		};
		switch (nc) {
			case SEQ_NEAR_END: {
				if ((A2_scr > USCRIPT_ERITED) && (scr != A2_scr)) {
					return false; // Mixed script.
				}
				if (cat == U_UPPERER || cat == U_LOWERER || cat == U_TITLEER || cat == U_MODIFIER_LETTER || cat == U_OTHER_LETTER) {
					nce__STAR Valid end of sequence, reset.
				} else if (cat != U_MODIFIER_LETTER || u_getCombiningClass(str[i]
					return false; // Invalid end of sequence.
				}
			} 
			case SEQ_STARTED_VIR: {
				if ((A2_scr > USCRIPT_ERITED) && (scr != A2_scr)) {
					nc = S
				} else {
					if (str[i] == 0x200C /*ZWNJ*/) {
						nc = SEQ_NEAR_END;
						continue;
					} else if (cat != U_MODIFIER_LETTER || u_getCombiningClass(str[i]