### 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 + 1] = (bitmap.buffer[byte] & bit) ? 255 : 0;
					} break;
					case FT_PIXEL_MODE_GRAY:
						wr[ofs + 0] = 255; 
						wr[ofs + 1] = bitmap.buffer[i * bitmap.pitch + j];
						break;
					case FT_PIXEL_MODE_BGRA: {
						int ofs_color = i * bitmap.pitch + (j << 2);
						wr[ofs + 2] = bitmap.buffer[ofs_color + 0];
						wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
						wr[ofs + 0] = bitmap.buffer[ofs_color + 2];
						wr[ofs + 3] = bitmap.buffer[ofs_color + 3];
					} break;
					case FT_PIXEL_MODE_LCD: {
						int ofs_color = i * bitmap.pitch + (j * 3);
						if (p_bgra) {
							wr[ofs + 0] = bitmap.buffer[ofs_color + 0];
							wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
							wr[ofs + 2] = bitmap.buffer[ofs_color + 2];
							wr[ofs + 3] = 255;
						} else {
							wr[ofs + 0] = bitmap.buffer[ofs_color + 2];
							wr[ofs + 1] = bitmap.buffer[ofs_color + 1];
							wr[ofs + 2] = bitmap.buffer[ofs_color + 0];
							wr[ofs + 3] = 255;
						}
					} break;
					case FT_PIXEL_MODE_LCD_V: {
						int ofs_color = i * bitmap.pitch * 3 + j;
						if (p_bgra) {