Sublime Forum

Sublime text using tons of ram

#1

I have sublime text build 3170 and I have only two files open. One is almost empty, and the other is only about 100 lines. However, when I keep it open for more than a few minutes, it quickly eats up all the ram, starting to use lots of swap space. This not only makes the editor really slow, having a large delay on even typing letters, but also slows down the rest of the OS too. The highest I’ve seen the memory usage be (ram + swap in Activity Monitor) is 16GB before I quit the app.

I’m running sublime text version 3.1 build 3170 on MacOS 10.13.4

1 Like

#2

I bet you’re also using some plugins no?

0 Likes

#3

does https://www.sublimetext.com/docs/3/revert.html make a difference?
do you have a folder open? is it being indexed?

0 Likes

#4

I think it’s fixed now. Having a large portion of your disk open as a folder is bad for memory usage. Thank you.

0 Likes

#5

Yes, creating a list of every file and folder uses memory to store each file path in memory, and then it will start working on indexing the contents of all of those files, which will add to memory usage also.

0 Likes

#6

Out of curiosity how big (in files and folders) was the folder you had open in Sublime? 16G seems an awful lot of memory use, I’ve never seen that

0 Likes

#7

What do you mean “having a folder open”? I’m seeing really large memory usage also, and I’m guessing that is the cause from reading above, but I don’t know how to fix it. Sublime 3.2.1 on OSX 10.14.4.

0 Likes

#8

It means having it added to the side bar. To power Goto Anything, we need a list of every file in the folders added to the side bar to allow users to quickly filter the file list.

0 Likes

#9

Thanks. I don’t think I use that feature right now. At least View -> Side Bar shows the hide option grayed out. Goto anything only shows currently opened files. Is there a list of what has been added to the side bar, in case something is going on in the background? Sublime is using 3.5GB of memory for about 100K of 10 open files. No CPU usage right now.

0 Likes

#10

Can you paste your console contents? The only way I could imagine such ram usage is if you have a file open from an extremely large git repo with an extremely high number of untracked or modified files.

0 Likes

#11

OK, my git repo has 4 files uncommited and none untracked.
Trying to post console, but it is too big (40K) and getting an error that new users are only allowed two links. This is the end with using gpu buffer repeats collapsed
Package Control: Installing 1 upgrades
ignored packages updated to: [“SideBarEnhancements”, “Vintage”]
reloading settings Packages/SideBarEnhancements/Side Bar.sublime-settings
unloading plugin SideBarEnhancements.SideBar
unloading plugin SideBarEnhancements.SideBarAPI
unloading plugin SideBarEnhancements.SideBarDefaultDisable
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
Package Control: Upgraded SideBarEnhancements to 5.0.34
ignored packages updated to: [“Vintage”]
reloading settings Packages/SideBarEnhancements/Side Bar.sublime-settings
reloading plugin SideBarEnhancements.SideBar
reloading plugin SideBarEnhancements.SideBarAPI
reloading plugin SideBarEnhancements.SideBarDefaultDisable
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
reloading /Users/garyunderwood/deid/java-app/data/resynthesis/code/ReplacementEngine.py
using gpu
git: untracking working dir /Users/garyunderwood/deid
git: tracking working dir /Users/garyunderwood/deid
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/afterUnify-small/105380247.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/afterUnify/188058661.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/afterUnify/105380247.xml
reloading /Users/garyunderwood/corpora/musc-version2/afterUnify/107110345.xml
using gpu
reloading /Users/garyunderwood/deid/java-app/data/resynthesis/code/ReplacementEngine.py
using gpu
reloading /Users/garyunderwood/deid/java-app/log/ListOfRuns.txt
reloading /Users/garyunderwood/deid/java-app/log/ListOfRuns.txt
using gpu
reloading /Users/garyunderwood/deid/java-app/scripts/sed_update.sh
reloading /Users/garyunderwood/deid/java-app/data/resynthesis/code/ReplacementEngine.py
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/try/144346832.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/resynthAfterUnify/107110345.deid.resynthesis.txt
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/resynthAfterUnifyUnicodeCleanClock/188556102.clock.xml
using gpu
using gpureloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/105380247.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/105380247.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/105380247.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/105380247.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/105380247.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/105380247.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/105380247.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/179441281.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/105380247.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/179441281.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/105380247.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/179441281.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClock/152885188.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClockButFixed/105380247.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthNoClockButFixedOutputs/107110345.annot
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthFixedWithClockOutputsFinal/167117708.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthFixedWithClockOutputsFinal/167117708.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthFixedWithClockOutputsFinal/167117708.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthFixedWithClockOutputsFinal/167117708.xml
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthFixedWithClockOutputsFinal/167117708.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthFixedWithClockOutputsFinal/167117708.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthFixedWithClockOutputsFinalResults/154679918.annot
reloading /Users/garyunderwood/corpora/musc-version2/xmlAfterResynthFixedWithClockOutputsFinalResults/167117708.original.txt
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/202767317.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/202767317.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/200065927.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/202767317.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/200065927.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/202767317.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/200065927.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/200065927.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/202767317.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/200065927.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/200065927.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/200065927.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/tempOut/200065927.xml
using gpu
Unable to open /Users/garyunderwood/Library/Application Support/Sublime Text 3/Packages/Default/Preferences.sublime-settings
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/redo/xmlAfterResynthWithClock2/201385392.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/xmlAfterResynthWithClock2/201385392.annot
Unable to open /Users/garyunderwood/Library/Application Support/Sublime Text 3/Packages/SideBarEnhancements/Side Bar.sublime-settings
Unable to open /Users/garyunderwood/Library/Application Support/Sublime Text 3/Packages/User/Side Bar.sublime-settings
reloading /Users/garyunderwood/corpora/musc-version2/redo/xmlAfterResynthWithClock2/201385392.deid.resynthesis.txt
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/redo/t2ChangedOut/201385392.annot
reloading /Users/garyunderwood/corpora/musc-version2/redo/t2Changed/201385392.xml
using gpu
reloading /Users/garyunderwood/corpora/musc-version2/redo/t2Changed/201385392.xml
reloading /Users/garyunderwood/corpora/musc-version2/redo/t2ChangedOut/201385392.annot
using gpu

0 Likes

#12

This is some of the beginning:
startup, version: 3207 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/garyunderwood/Library/Application Support/Sublime Text 3/Packages
state path: /Users/garyunderwood/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/garyunderwood/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: [“Vintage”]
pre session restore time: 0.321404
using gpu
startup time: 0.54662
git: tracking working dir /Users/garyunderwood/deid
environment variables loaded using: /bin/bash -l
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.detect_indentation
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin 0_package_control_loader.00-package_control
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin SideBarEnhancements.SideBar
reloading plugin SideBarEnhancements.SideBarAPI
reloading plugin SideBarEnhancements.SideBarDefaultDisable
plugins loaded
Package Control: Exported certificate: Common Name: UCA Global Root, Organization: UniTrust, Country: CN
Package Control: Exported certificate: Common Name: DST Root CA X3, Organization: Digital Signature Trust Co.

0 Likes

#13

I’m curious if the issue is resolved by resetting to a fresh state - https://www.sublimetext.com/docs/3/revert.html.

I see lots of instances of using gpu - did you trim that message in any way? Are you opening and closing lots of windows?

0 Likes

#14

I have an issue on Mac OS that I’ve narrowed down to having a lot of Sublime text windows open. When I’m facing the issue, it is not uncommon for other applications such as Safari to stop working properly or at all. And if enough windows are open, there may be major GUI lags, and usually during bouts of really bad GUI lag the entire OS will crash.

Is there a workaround that will enable me to have many files open (30+) without facing these issues?

0 Likes

#15

If you can replicate this in a freshly installed state, I would recommend opening an issue on the issue tracker with as many details as possible (OS details, steps of reproduction etc).

0 Likes