SublimeCodeIntel内存泄漏

时间:2013-03-09 01:44:52

标签: memory-leaks editor sublimetext2

当我在编写代码或纯文本时使用Sublime和 sublimecodeintel 包时,它使用~1.2GB的内存和0%的CPU。我观察了内存使用的行为,似乎每次我输入一个字时内存使用量都会跳~1MB。 如果我设置"codeintel": false,,则内存使用率将恢复正常。 这对我来说似乎是一个内存泄漏问题。有什么方法可以解决这个问题吗?

这是我对sublimecodeintel的设置(我使用默认设置)

/*
    SublimeCodeIntel default settings
*/
{
    /*
        Sets the mode in which SublimeCodeIntel runs:

        true - Enabled (the default).
        false - Disabled.
    */
    "codeintel": true,

    // An array of language names which are disabled.
    "codeintel_disabled_languages":
    [
    ],

    /*
        Sets the mode in which SublimeCodeIntel's live autocomplete runs:

        true - Autocomplete popups as you type (the default).
        false - Autocomplete popups only when you request it.
    */
    "codeintel_live": true,

    // An array of language names to disable.
    "codeintel_live_disabled_languages":
    [
    ],

    /*
        Maps syntax names to languages. This allows variations on a syntax
        (for example "Python (Django)") to be used. The key is
        the base filename of the .tmLanguage syntax files, and the value
        is the syntax it maps to.
    */
    "codeintel_syntax_map":
    {
        "Python Django": "Python"
    }
}

1 个答案:

答案 0 :(得分:3)

最简单的解决方法是设置"codeintel":false,。如果您前往Github并查看问题,您会发现许多人在性能方面存在问题,特别是在大型项目上。该插件最初从Open Komodo Editor移植到Sublime,我认为在翻译中丢失了一些性能。我在处理小型项目时没有遇到任何问题,但是如果我开始在SublimeREPL中使用pylab开始使用IPython(它会导入numpy和{{1}的很大一部分然后,性能可以慢慢爬行 - 这是在具有20GB RAM的四核3.4 GHz i7上,所以我不会挨饿。

不幸的是,它看起来没有任何性能问题得到响应,更不用说在代码中解决了,所以如果有人愿意描述并修复它,我们都会感激不尽!