### 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();
	rids.clear();
	if (fallbacks.is_empty() && f.is_valid()) {
		RID rid = _get_rid();
		if (rid.is_valid()) {
			rids.push_back(rid);
		}
		const TypedArray<Font> &base_fallbacks = f->get_fallbacks();
		for (int i = 0; i < base_fallbacks.size(); i++) {
			_update_rids_fb(base_fallbacks[i], 0);
		}
	} else {
		_update_rids_fb(const_cast<FontVariation *>(this), 0);
	}
	dirty_rids = false;
}
void FontVariation::reset_state() {