### 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
ftr_stretch = stretch;
			}
			if (ftr.has(TS->name_to_tag("weight"))) {
				ftr_weight = weight;
			}
			if (italic && ftr.has(TS->name_to_tag("italic"))) {
				ftr_italic = 1;
			}
		}
		
		file->set_antialiasing(antialiasing);
		file->set_generate_mipmaps(mipmaps);
		file->set_force_autohinter(force_autohinter);
		file->set_allow_system_fallback(allow_system_fallback);
		file->set_hinting(hinting);
		file->set_subpixel_positioning(subpixel_positioning);
		file->set_multichannel_signed_distance_field(msdf);
		file->set_msdf_pixel_range(msdf_pixel_range);
		file->set_msdf_size(msdf_size);
		file->set_oversampling(oversampling);
		base_font = file;
		break;
	}
	if (base_font.is_valid()) {
		base_font->connect_changed(callable_mp(reinterpret_cast<Font *>(this), &Font::_invalidate_rids), CONNECT_REFERENCE_COUNTED);
	}
	_invalidate_rids();
	notify_property_list_changed();
}
void SystemFont::reset_state() {