### 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 (msdf_size != p_msdf_size) {
		msdf_size = p_msdf_size;
		if (base_font.is_valid()) {
			base_font->set_msdf_size(msdf_size);
		}
		emit_changed();
	}
}
int SystemFont::get_msdf_size() const {
	return msdf_size;
}
void SystemFont::set_oversampling(real_t p_oversampling) {
	if (oversampling != p_oversampling) {
		oversampling = p_oversampling;
		if (base_font.is_valid()) {
			base_font->set_oversampling(oversampling);
		}
		emit_changed();
	}
}
real_t SystemFont::get_oversampling() const {
	return oversampling;
}
void SystemFont::set_font_names(const PackedStringArray &p_names) {
	if (names != p_names) {
		names = p_names;
		_update_base_font();
	}
}
PackedStringArray SystemFont::get_font_names() const {