macos - rsession 空闲时CPU使用率

标签 macos r rstudio

我最近注意到我的 R/RStudio 安装存在问题。当我打开 RStudio 时,事件监视器中的 CPU 使用率显示 rsession 和 kernel_task 进程的使用率徘徊在 30% 左右,即使 R 空闲且未运行任何内容也是如此。我知道这是对问题的非常模糊的描述,我希望这里有人可以指导我如何调试这个问题或发布更多相关信息。

谢谢。

> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_2.15.2

最佳答案

如果您正在处理特定的 Rstudio 项目,并且该项目有大量文件(数百或数千),Rstudio 可能会尝试对文件建立索引 -

我通过以下方式解决了这个问题:

  1. 在项目中使用 Rstudio IDE,
  2. 转到工具 -> 项目选项
  3. 现在点击代码编辑
  4. 取消选择索引 R 源文件
  5. 关闭所有内容并重新启动 Rstudio

Editing

Index R source files — Determines whether R source files within the project directory are indexed for code navigation (i.e. go to file/function, go to function definition). Normally this should remain enabled, however if you have a project directory with thousands of files and are concerned about the overhead of monitoring and indexing them you can disable indexing here.
Insert spaces for tab — Determine whether the tab key inserts multiple spaces rather than a tab character (soft tabs). Configure the number of spaces per soft-tab.
Text encoding — Specify the default text encoding for source files. Note that source files which don't match the default encoding can still be opened correctly using the File : Reopen with Encoding menu command. Source

关于macos - rsession 空闲时CPU使用率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14599359/

相关文章:

r - 防止生产线中断的文本输出

r - 在 R 中使用 diffObj 时显示新行(不是新行字符)?

r - Linux 环境中默认的 .RData 工作空间保存在哪里?

swift - macOS fatal error : Index out of range NSTableView

ios - Swift Data(contentsOf) 参数传递给不带参数的调用

r - 如何绘制不同长度的向量列表?

r - 这些 R 变量图标是什么意思?

python - 在 OSX Snow Leopard 上安装 IPython 以使用非默认 python 版本(即 python2.6.6/python2.7)

cocoa - 我想构建一个 OSX 应用程序,将一些简单的 DSP 应用于所有音频。我从哪里开始?

r - 在 R 中将 1 列拆分为 1 到 3 列