### 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
score += (20 - Math::abs(stretch - font_stretch) / 10);
									if (bool(style & TextServer::FONT_ITALIC) == bool(font_style & TextServer::FONT_ITALIC)) {
										score += 30;
									}
									if (score >= best_score) {
										best_score = score;
										best_match = face_idx;
									}
									if (best_score == 70) {
										break;
									}
								}
								if (best_match != -1) {
									gl.font_rid = sysf_cache.var[best_match].rid;
								}
							}
							if (!gl.font_rid.is_valid()) {
								if (system_fonts.has(key)) {
									const SystemFontCache &sysf_cache = system_fonts[key];
									if (sysf_cache.max_var == sysf_cache.var.size()) {
										
										continue;
									}
								}
								if (!system_font_data.has(E)) {
									system_font_data[E] = FileAccess::get_file_as_bytes(E);
								}
								const PackedByteArray &font_data = system_font_data[E];
								SystemFontCacheRec sysf;
								sysf.rid = _create_font();