### 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
real_t s_v = def.z;
				if (p_variation_coordinates.has(*V)) {
					real_t val = p_variation_coordinates[*V];
					s_v = CLAMP(val, def.x, def.y);
				}
				if (p_variation_coordinates.has(TS->tag_to_name(*V))) {
					real_t val = p_variation_coordinates[TS->tag_to_name(*V)];
					s_v = CLAMP(val, def.x, def.y);
				}
				match = match && (c_v == s_v);
			}
			if (match) {
				return cache[i];
			}
		}
	}
	
	int idx = cache.size();
	_ensure_rid(idx);
	TS->font_set_variation_coordinates(cache[idx], p_variation_coordinates);
	TS->font_set_face_index(cache[idx], p_face_index);
	TS->font_set_embolden(cache[idx], p_strength);
	TS->font_set_transform(cache[idx], p_transform);
	TS->font_set_spacing(cache[idx], TextServer::SPACING_TOP, p_spacing_top);
	TS->font_set_spacing(cache[idx], TextServer::SPACING_BOTTOM, p_spacing_bottom);
	TS->font_set_spacing(cache[idx], TextServer::SPACING_SPACE, p_spacing_space);
	TS->font_set_spacing(cache[idx], TextServer::SPACING_GLYPH, p_spacing_glyph);
	return cache[idx];
}
RID FontFile::_get_rid() const {