### 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
wr[ofs + 0] = bitmap.buffer[ofs_color + bitmap.pitch * 2];
							wr[ofs + 1] = bitmap.buffer[ofs_color + bitmap.pitch];
							wr[ofs + 2] = bitmap.buffer[ofs_color + 0];
							wr[ofs + 3] = 255;
						} else {
							wr[ofs + 0] = bitmap.buffer[ofs_color + 0];
							wr[ofs + 1] = bitmap.buffer[ofs_color + bitmap.pitch];
							wr[ofs + 2] = bitmap.buffer[ofs_color + bitmap.pitch * 2];
							wr[ofs + 3] = 255;
						}
					} 
					default:
						ERR_FAIL_V_MSG(FontGlyph(), "Font uses unsupported pixel format: " + String::num_int64(bitmap.pixel_mode) + ".");
						
				}
			}
		}
	}
	tex.dirty = true;
	FontGlyph chr;
	chr.advance = advance * p_data->scale / p_data->oversampling;
	chr.texture_idx = tex_pos.index;
	chr.found = true;
	chr.uv_rect = Rect2(tex_pos.x + p_rect_margin, tex_pos.y + p_rect_margin, w + p_rect_margin * 2, h + p_rect_margin * 2);
	chr.rect.position = Vector2(xofs - p_rect_margin, -yofs - p_rect_margin) * p_data->scale / p_data->oversampling;
	chr.rect.size = chr.uv_rect.size * p_data->scale / p_data->oversampling;
	return chr;
}
#endif
_FORCE_INLINE_ bool TextServerAdvanced::_ensure_glyph(FontAdvanced *p_font_data, const Vector2i &p_size, int32_t p_glyph) const {