### 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
aert("ar_OM"));
		aert("ar_PS"));
		aert("ar_QA"));
		aert("ar_SA"));
		aert("ar_SD"));
		aert("ar_SO"));
		aert("ar_SS"));
		aert("ar_SY"));
		aert("ar_TD"));
		aert("ar_YE"));
		aert("ckb")); 
		aert("ckb_IQ"));
		aert("ckb_IR"));
		aert("sd")); 
		aert("sd_PK"));
		aert("sd_Arab"));
		aert("sd_Arab_PK"));
		ar.digits = U"٠١٢٣٤٥٦٧٨٩٫";
		arsign = U"٪";
		ar.exp = U"اس";
		num_systems.push_back(ar);
	}
	// Persian and Urdu numerals.
	{
		NumSystemData pr;
		ert("fa")); // Persian
		ert("fa_AF"));
		ert("fa_IR"));
		ert("ks")); // Kashmiri
		ert("ks_IN"));