adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.26k stars 7.64k forks source link

[Performance] High CPU and Memory usage #11990

Open Otolock opened 8 years ago

Otolock commented 8 years ago

Right now, I've got 5 .js files open, all less than 100 lines of code. I noticed the program slugging behind and when I opened up Task Manager, Brackets was using 19% of my CPU (I have an FX-6300, plus Firefox is open beside it and it's only taking 1.5%). Secondly, its using 608.9MB of ram, compared to Firefox which has 6 tabs open and its only using 286.3MB.

If any additional debugging info is needed please let me know and I'll edit my post to provide it.

System Specs: CPU: FX-6300 @ 3.5Ghz Ram: 8GB DDR3 OS: Windows 10 Pro

abose commented 8 years ago

Can you go to help>health report and comment it here.

Otolock commented 8 years ago
{
    "uuid": "672c8fd4-9120-41b4-9d3c-5b002b9b25a5",
    "snapshotTime": 1449866621542,
    "os": "win",
    "userAgent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Brackets/1.5.0.0 Chrome/39.0.2171.36 Safari/537.36",
    "osLanguage": "en-US",
    "bracketsLanguage": "en-US",
    "bracketsVersion": "1.6.0-0",
    "ProjectDetails": {
        "prj-1232589954": {
            "numFiles": 3040,
            "cacheSize": 12051715
        }
    },
    "fileStats": {
        "openedFileExt": {
            "json": 17,
            "js": 76,
            "html": 22
        },
        "workingSetFileExt": {
            "js": 9,
            "html": 3,
            "json": 5
        }
    },
    "projectLoadTimes": ":152",
    "fileOpenTimes": ":405:175",
    "ModuleDepsResolved": 2143,
    "AppStartupTime": 7802,
    "prefNodeSearchDisabled": false,
    "prefInstantSearchDisabled": false,
    "installedExtensions": [
        {
            "name": "coolwater",
            "version": "1.0.1"
        },
        {
            "name": "dark_soda_theme",
            "version": "0.1.6"
        },
        {
            "name": "default-dark",
            "version": "2.0.0"
        },
        {
            "name": "brackets-indentator",
            "version": "1.0.3"
        },
        {
            "name": "brackets-npm-registry",
            "version": "0.3.5"
        },
        {
            "name": "camden.jshint",
            "version": "2.2.18"
        },
        {
            "name": "adobe.brackets.extract",
            "version": "0.8.0-1749-release"
        }
    ],
    "bracketsTheme": "dark_soda_theme"
}
Otolock commented 8 years ago

I don't know how or when I closed this but I didn't mean to. I'm still having problems. Looks like I accidentally hit comment and close.

iegik commented 8 years ago
{
    "uuid": "829760e2-ede5-4700-8f5b-8bc16cdd9354",
    "snapshotTime": 1473259074413,
    "os": "linux",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.80 Safari/537.36",
    "osLanguage": "ru",
    "bracketsLanguage": "ru",
    "bracketsVersion": "1.7.0-16898",
    "fileStats": {
        "openedFileExt": {
            "js": 50,
            "json": 2,
            "tpl": 19,
            "php": 94,
            "html": 2
        },
        "workingSetFileExt": {
            "php": 1,
            "js": 2
        }
    },
    "ProjectDetails": {
        "prj1283840588": {
            "numFiles": 2529,
            "cacheSize": 166014746
        },
        "prj1233834425": {
            "numFiles": 2299,
            "cacheSize": 13006642
        },
        "prj-1128325397": {
            "numFiles": 2765,
            "cacheSize": 12059649
        }
    },
    "searchDetails": {
        "searchNew": 20,
        "searchInstant": 98,
        "searchCaseSensitive": 110,
        "searchOnReturnKey": 8,
        "searchRegExp": 13
    },
    "projectLoadTimes": ":1",
    "fileOpenTimes": ":1",
    "ModuleDepsResolved": 2412,
    "AppStartupTime": 2415,
    "prefNodeSearchDisabled": false,
    "prefInstantSearchDisabled": false,
    "installedExtensions": [
        {
            "name": "ivogabe.icons",
            "version": "1.5.7"
        },
        {
            "name": "com.doersguild.brackets.phplint",
            "version": "1.0.2"
        },
        {
            "name": "quickdocsphp",
            "version": "1.4.7"
        },
        {
            "name": "brackets-emmet",
            "version": "1.2.2"
        },
        {
            "name": "brackets-es6",
            "version": "1.0.0"
        },
        {
            "name": "brackets-minify",
            "version": "1.1.6"
        },
        {
            "name": "gruehle.markdown-preview",
            "version": "1.0.11"
        },
        {
            "name": "brackets-html-wrapper",
            "version": "1.2.0"
        },
        {
            "name": "brackets-csscomb",
            "version": "1.0.0"
        },
        {
            "name": "pflynn.svg.preview",
            "version": "1.3.0"
        },
        {
            "name": "funcdocr",
            "version": "0.8.41"
        },
        {
            "name": "interactive-linter",
            "version": "1.0.5"
        },
        {
            "name": "brackets-beautify",
            "version": "2.2.0"
        },
        {
            "name": "brackets-sort-text",
            "version": "0.1.4"
        },
        {
            "name": "zaggino.brackets-git",
            "version": "0.16.6"
        }
    ],
    "bracketsTheme": "light-theme"
}
iegik commented 8 years ago

possible Memory Leak at /thirdparty/CodeMirror/lib/codemirror.js:1390

// Poll for input changes, using the normal rate of polling. This
    // runs as long as the editor is focused.
    slowPoll: function() {
      var input = this;
      if (input.pollingFast) return;
      input.polling.set(this.cm.options.pollInterval, function() {
        input.poll();
        if (input.cm.state.focused) input.slowPoll();
      });
    },
zaggino commented 8 years ago

@iegik since you're on linux, can you test this with https://github.com/zaggino/brackets-electron/releases please?

damiankw commented 6 years ago

I'm having the same issue as this. When Brackets is in the background it's fine, the second I start using it, even if I'm just randomly clicking lines without editing the CPU jumps up. If I click every three seconds in random places on my code it'll jump to 30% within a couple of clicks, if I scroll it'll jump up to 45%.

I'm on a brand spankin' new HP Z240 Workstation i5-6500 3.2GHz with 8GB RAM.

{ "snapshotTime": 1513554916078, "os": "win", "userAgent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Brackets/1.11.0.0 Chrome/49.0.2623.110 Safari/537.36", "osLanguage": "en-US", "bracketsLanguage": "en-US", "bracketsVersion": "1.11.0-17524", "fileStats": { "openedFileExt": { "html": 4 }, "workingSetFileExt": { "html": 1 }, "openedFileEncoding": { "UTF-8": 4 } }, "ProjectDetails": { "prj-1495952211": { "numFiles": 145, "cacheSize": 4142361 } }, "projectLoadTimes": ":114", "fileOpenTimes": ":487", "ModuleDepsResolved": 748, "AppStartupTime": 1670, "prefNodeSearchDisabled": false, "prefInstantSearchDisabled": false, "installedExtensions": [], "bracketsTheme": "light-theme", "uuid": "5dbf-9450-0285-fdf3-0031", "olderuuid": "5dbf-9450-0285-fdf3-0031" }