### 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
Ref<Font> f = _get_base_font_or_default();
	if (f.is_valid()) {
		if (!face_indeces.is_empty()) {
			Dictionary var;
			if (ftr_weight > 0) {
				var[TS->name_to_tag("weight")] = ftr_weight;
			}
			if (ftr_stretch > 0) {
				var[TS->name_to_tag("width")] = ftr_stretch;
			}
			if (ftr_italic > 0) {
				var[TS->name_to_tag("italic")] = ftr_italic;
			}
			return f->find_variation(var, face_indeces[0]);
		} else {
			return f->_get_rid();
		}
	}
	return RID();
}
int64_t SystemFont::get_face_count() const {
	return face_indeces.size();
}
SystemFont::SystemFont() {
	
}
SystemFont::~SystemFont() {
}