Sublime Forum

Can someone explain why Sublime Text is using over 70GB of ram?

#1

It’s normally the most RAM intensive application on my machine anyways (consistently over 15 GB), but the RAM explodes if I ever happen to accidentally increase/decrease the font size. So I make sure not to do that. However, in this case I accidentally hit cmd + - when I meant alt + shift + - and held it down as I intended to type multiple em dashes. This caused the ram to EXPLODE. Why is that?

Background

I have about 60 individual windows open, most — I think — with several other open items in the side pane and pretty much all of them are unsaved items (no corresponding file).
Running macOS Ventura 13.0.1 on a 2021 24-inch iMac M1 with 16 GB RAM.

1 Like

#2

Does it happen in safe mode?

0 Likes

#3

No idea. Only use my computer in normal mode.

0 Likes

#4

Please follow the link and check if it still happens when running Sublime Text in safe mode.

0 Likes

#5

After some hours, a pretty good bunch of files opened, the last one 23Mb, 1M lines, mine is less RAM greedy

0 Likes

#6

And I can assure you not a single one of my open windows has 1M lines; probably, at the most 500 lines. And many, if not most, are considerably less.

0 Likes

#7

There must be something there in your system. Trying to restart in Safe Mode (to do it depends on your Mac model, old ones ⌘-S while restarting…), can show you the problem behind it. Most probably not Sublime’s

0 Likes

#8

Can’t Mac’s activity monitor (process manager?) expand subprocesses? I doubt that it’s cause by a LSP server. But there isn’t much information in this thread.

0 Likes

#9

What do you mean by in my system? In what part of my system? As I don’t do anything out of the ordinary other than have as many windows of Sublime Text open as I previously said. And Activity Monitor is pretty clear about it being Sublime Text that’s the one using that much memory.

And even in Sublime Text my settings are pretty ordinary I think:

{
	"color_scheme": "Packages/User/IDLE.tmTheme",
	"font_face": "Consolas",
	"font_size": 14,
	"gpu_window_buffer": "true",
	"gutter": false,
	"ignored_packages":
	[
		"Vintage"
	],
	"index_files": false,
	"index_workers": 0,
	"line_numbers": true,
	"show_full_path": true,
	"show_git_status": false,
}

0 Likes

#10

This is really all I can see expanding Sublime Text in Activity Monitor:

0 Likes

#11

Please check if it also happens in safe mode.

0 Likes

#12

Everything in your system takes a bunch of Gbytes, that’s not normal, and WindowServer using 16.63GB of memory or Chrome 8, has nothing to do with ST

0 Likes

#13

You can see the child processes in tree form by selecting View > All processes, Hierarchically in Activity Monitor’s menu. But the memory use of the child processes does not contribute to the number shown for the application anyway.

0 Likes

#14

No it does not:

0 Likes

#15

Well window server deals with GUI stuff, and this problem only rears its head when I have a large amount of Sublime windows open (~60), so not entirely unrelated. But whatever way you spin it that fact of the matter is that Sublime Text is using that much RAM, and that shouldn’t be the case. Chrome using 6GB is hardly a red flag depending on what you have open, but a text editor using over 10 times that amount certainly is.

0 Likes

#16

Not really, that’s beyond the resources consumption baseline expected by any app — i.e. regardless of the files open, disk-caching should prevent such high RAM consumption thresholds.

But then, I’m not a macOS user, so I can’t tell what the normal expectation are here, but @juanfal’s comments seem to confirm that these are rather high.

By any chance, is this a virtualized macOS? (i.e. is it running in a virtual machine of any sort?)

Software virtualization might explain the extra RAM consumption.

0 Likes

#17

According to where?

I don’t understand. How so?

Not virtualized. It’s a 2021 M1 iMac running macOS Ventura 13.0.1.

0 Likes

#18

@chrisbia you’ve not respond to @bschaaf o. What happens if it happens in Safe Mode for Sublime Text which would really help.

0 Likes