### 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
FT_Get_MM_Var(fd->face, &amaster);
			Vector<FT_Fixed> coords;
			coords.resize(amaster->num_axis);
			FT_Get_Var_Design_Coordinates(fd->face, coords.size(), coords.ptrw());
			for (FT_UInt i = 0; i < amaster->num_axis; i++) {
				
				int32_t var_tag = amaster->axis[i].tag;
				double var_value = (double)amaster->axis[i].def / 65536.0;
				coords.write[i] = amaster->axis[i].def;
				if (p_font_data->variation_coordinates.has(var_tag)) {
					var_value = p_font_data->variation_coordinates[var_tag];
					coords.write[i] = CLAMP(var_value * 65536.0, amaster->axis[i].minimum, amaster->axis[i].maximum);
				}
				if (p_font_data->variation_coordinates.has(_tag_to_name(var_tag))) {
					var_value = p_font_data->variation_coordinates[_tag_to_name(var_tag)];
					coords.write[i] = CLAMP(var_value * 65536.0, amaster->axis[i].minimum, amaster->axis[i].maximum);
				}
			}
			FT_Set_Var_Design_Coordinates(fd->face, coords.size(), coords.ptrw());
			FT_Done_MM_Var(ft_library, amaster);
		}
#else
		memdelete(fd);
		ERR_FAIL_V_MSG(false, "FreeType: Can't load dynamic font, engine is compiled without FreeType support!");
#endif
	}
	p_font_data->cache[p_size] = fd;
	return true;
}
_FORCE_INLINE_ void TextServerFallback::_font_clear_cache(FontFallback *p_font_data) {