### Godot version

4.0.3 stable

### System information

Windows 10, i5 8600, RTX3060, 64 GB ram

### Issue description

In Godot 4, labels with lots of text cause scenes to load extremely slowly, both in the editor and in-game.

I measured a few game starts with different amounts of text in a label:

Text length | Game start time
-- | --
11323 | 2.33
22693 | 7.93
34064 | 19.69
45431 | 40.59

In Godot 3, the startup times for all test lengths was almost instantaneous.

The text I used was multiple copies of the license agreement for Google's [Roboto](https://fonts.google.com/specimen/Roboto) font. A "credits" page on a game could easily get well above this length.
Looking at a scatter plot with a best fit, it's pretty clearly increasing at around n^2:

![image](https://github.com/godotengine/godot/assets/8082633/6e2a9c41-f3fb-429d-acd3-288c24c6b744)

Results are the same whether I'm using the built-in font or a custom font, and results are similar across all renderers. Settings like text wrapping don't seem to affect it either.

### Steps to reproduce

Create a scene, add a label to that scene, and fill the label with a large amount of text. Try to launch the game and load that scene.

### Minimal reproduction project

[Godot3LargeLabel.zip](https://github.com/godotengine/godot/files/11521494/Godot3LargeLabel.zip)
[Godot4LargeLabel.zip](https://github.com/godotengine/godot/files/11521495/Godot4LargeLabel.zip)

if (p_gl.font_rid != RID()) {
		if (p_font_shadow_color.a > 0) {
			TS->font_draw_glyph(p_gl.font_rid, p_canvas, p_gl.font_size, p_ofs + Vector2(p_gl.x_off, p_gl.y_off) + shadow_ofs, p_gl.index, p_font_shadow_color);
		}
		if (p_font_shadow_color.a > 0 && p_shadow_outline_size > 0) {
			TS->font_draw_glyph_outline(p_gl.font_rid, p_canvas, p_gl.font_size, p_shadow_outline_size, p_ofs + Vector2(p_gl.x_off, p_gl.y_off) + shadow_ofs, p_gl.index, p_font_shadow_color);
		}
		if (p_font_outline_color.a != 0.0 && p_outline_size > 0) {
			TS->font_draw_glyph_outline(p_gl.font_rid, p_canvas, p_gl.font_size, p_outline_size, p_ofs + Vector2(p_gl.x_off, p_gl.y_off), p_gl.index, p_font_outline_color);
		}
	}
}
void Label::_update_theme_item_cache() {
	Control::_update_theme_item_cache();
	theme_cache.normal_style = get_theme_stylebox(SNAME("normal"));
	theme_cache.font = get_theme_font(SNAME("font"));
	theme_cache.font_size = get_theme_font_size(SNAME("font_size"));
	theme_cache.line_spacing = get_theme_constant(SNAME("line_spacing"));
	theme_cache.font_color = get_theme_color(SNAME("font_color"));
	theme_cache.font_shadow_color = get_theme_color(SNAME("font_shadow_color"));
	theme_cache.font_shadow_offset = Point2(get_theme_constant(SNAME("shadow_offset_x")), get_theme_constant(SNAME("shadow_offset_y")));
	theme_cache.font_outline_color = get_theme_color(SNAME("font_outline_color"));
	theme_cache.font_outline_size = get_theme_constant(SNAME("outline_size"));
	theme_cache.font_shadow_outline_size = get_theme_constant(SNAME("shadow_outline_size"));
}
PackedStringArray Label::get_configuration_warnings() const {