Sublime text 3 在闲置时使用大量 CPU
Sublime text 3 using massive amount of CPU on idle
我 运行 Sublime Text 3 在 Windows 10,所有已安装的软件包都被禁用。闲置时,打开一个文件,它占用了我 CPU 的 ~31%。对于文本编辑器来说,这似乎是一个荒谬的数量 - 这是为什么?
这似乎是由索引引起的:
https://github.com/SublimeTextIssues/Core/issues/537
https://www.sublimetext.com/blog/articles/file-indexing
尝试添加
"index_files": false
在你的配置中
Sublime text 为您提供了一个界面来检查索引状态。
转到菜单帮助 -> 索引状态。
是索引文件的问题。只是禁用它。这可以通过添加 "index_files": false, 到您的首选项来完全禁用。sublime-settings(首选项 > 设置)。
您可以通过更改
来限制索引
"index_workers": 0 // Automatic worker spawning based on CPU
至
"index_workers": 1 // One worker only
在您的用户设置 JSON 文件中。
这对我有用:
- 开启Activity监控
- 查找插件主机
- 公开信息
- 打开文件和端口
- 搜索 /Users//Library/Application Support/Sublime 文本 3/已安装的软件包
- 停用它们
另一种不需要禁用索引的解决方案是将“重”目录排除在索引之外。添加首选项:
"folder_exclude_patterns": [
"node_modules",
"a_heavy_directory_name"
]
来自:https://github.com/sublimehq/sublime_text/issues/537#issuecomment-237580498
我 运行 Sublime Text 3 在 Windows 10,所有已安装的软件包都被禁用。闲置时,打开一个文件,它占用了我 CPU 的 ~31%。对于文本编辑器来说,这似乎是一个荒谬的数量 - 这是为什么?
这似乎是由索引引起的:
https://github.com/SublimeTextIssues/Core/issues/537
https://www.sublimetext.com/blog/articles/file-indexing
尝试添加
"index_files": false
在你的配置中
Sublime text 为您提供了一个界面来检查索引状态。
转到菜单帮助 -> 索引状态。
是索引文件的问题。只是禁用它。这可以通过添加 "index_files": false, 到您的首选项来完全禁用。sublime-settings(首选项 > 设置)。
您可以通过更改
来限制索引"index_workers": 0 // Automatic worker spawning based on CPU
至
"index_workers": 1 // One worker only
在您的用户设置 JSON 文件中。
这对我有用:
- 开启Activity监控
- 查找插件主机
- 公开信息
- 打开文件和端口
- 搜索 /Users//Library/Application Support/Sublime 文本 3/已安装的软件包
- 停用它们
另一种不需要禁用索引的解决方案是将“重”目录排除在索引之外。添加首选项:
"folder_exclude_patterns": [
"node_modules",
"a_heavy_directory_name"
]
来自:https://github.com/sublimehq/sublime_text/issues/537#issuecomment-237580498