Performance issue when .git is on root?


#1

As others mentioned before, I was having performance issues when using Atom, so I decided to remove just about all packages, and see if I could spot the one that was causing the problem.

The scenario/test-case that I using was ‘tabbing a coffee-script method in a file with 188 lines’. What was happing was that there was about a 500ms-to-1000sec delay every time I pressed on tab (the actually delay might be lower, but it really felt that long)

After removing just about all packages, I was still having that delay, so I tried one last thing, which actually worked.

I opened the folder that contained the file I was editing in a new ‘Atom Window’ and the speed increase was very significant (into a speed that fell more natural).

I don’t know very well the Atom’s internals, but I managed to replicate both scenarios under the profiler and there seems to be a lot more happening on the left (which is the slow version) than on the right (which is working at a good speed). Hopefully the image below makes sense to a more experienced Atom developer:

For reference here is what my config.cson file looks like

"*":
  editor:
    fontSize: 11
    invisibles: {}
  core:
    disabledPackages: [
      "git-log"
      "git-plus"
      "run-in-atom"
      "terminal-status"
      "_lcov-info"
      "autocomplete-plus"
      "coffee-eval"
      "minimap"
      "web-browser"
      "command-toolbar"
      "atom-browser-webview"
      "atom-lint"
      "coffee-navigator"
      "travis-ci-status"
      "git-control"
      "mocha-test-runner"
      "coffee-lint"
      "block-selection-mode"
      "atom-runner"
      "lcov-info"
      "saveallthetime"
      "layout-manager"
      "language-objective-c"
      "autoflow"
      "wrap-guide"
      "whitespace"
      "autosave"
      "background-tips"
      "bookmarks"
      "bracket-matcher"
      "language-php"
      "deprecation-cop"
      "dev-live-reload"
      "encoding-selector"
      "exception-reporting"
      "fuzzy-finder"
      "git-diff"
      "go-to-line"
      "grammar-selector"
      "image-view"
      "incompatible-packages"
      "keybinding-resolver"
      "language-c"
      "language-clojure"
      "language-coffee-script"
      "language-sql"
      "archive-view"
      "find-and-replace"
      "language-css"
      "language-gfm"
      "language-git"
      "language-go"
      "language-html"
      "language-hyperlink"
      "language-java"
      "language-javascript"
      "language-json"
      "language-less"
      "language-make"
      "language-mustache"
      "autocomplete"
      "markdown-preview"
      "welcome"
      "language-perl"
      "language-property-list"
      "language-python"
      "language-ruby"
      "language-ruby-on-rails"
      "language-shellscript"
      "language-source"
      "language-text"
      "language-todo"
      "language-toml"
      "language-xml"
      "language-yaml"
      "link"
      "command-palette"
      "metrics"
      "notifications"
      "open-on-github"
      "package-generator"
      "release-notes"
      "styleguide"
      "update-package-dependencies"
      "snippets"
      "spell-check"
      "status-bar"
      "language-sass"
      "symbols-view"
      "timecop"
    ]
  "exception-reporting":
    userId: "44be0b63-5bc5-c0bf-7ea7-a36a182de9a3"
  welcome:
    showOnStartup: false
  metrics:
    userId: "b0b7593a68594e00dc0f8219aabfa35c0b46bfdd"
  "git-plus": {}
  "git-diff":
    showIconsInEditorGutter: true
  "git-log":
    fontScale: "Default: 1.9"
  "mocha-test-runner":
    options: "--compilers coffee:coffee-script/register"
    showDebugInformation: true
  "terminal-status":
    WindowHeight: 100
  "lcov-info": {}
  "markdown-preview": {}
  "autocomplete-plus": {}
  "atom-lint": {}
  "travis-ci-status": {}

I mention on the title that the root cause could be related to git, since that is a difference between the root folders (or both Atom editors). Another difference is that the editor on the left contains the node_modules folder.


#2

For reference I’m still getting good performance once I enabled all packages