prettier/prettier-atom

Slow Activation Time

Open

#330 建立於 2017年12月28日

在 GitHub 查看
 (25 留言) (1 反應) (0 負責人)JavaScript (764 star) (106 fork)batch import
enhancementgood first issue

描述

Current Behavior

prettier-atom is showing up as my slowest package, with an activation time nearly 2x as long as the subsequent package.

image

Expected Behavior

I would expect prettier-atom to boot closer to 100 ms? It seems to be an outlier, and I would like to understand why.

Debug Info

Atom version: 1.23.1
prettier-atom version: 0.43.1
prettier version: 1.9.2
prettier-eslint version: 8.6.0
prettier-atom configuration: {
  "useEslint": false,
  "useStylelint": false,
  "useEditorConfig": true,
  "formatOnSaveOptions": {
    "enabled": false,
    "respectEslintignore": true,
    "showInStatusBar": false,
    "javascriptScopes": [
      "source.js",
      "source.jsx",
      "source.js.jsx",
      "source.babel",
      "source.js-semantic",
      "text.html.basic",
      "text.html.vue"
    ],
    "typescriptScopes": [
      "source.ts",
      "source.tsx",
      "source.ts.tsx"
    ],
    "cssScopes": [
      "source.css",
      "source.less",
      "source.css.less",
      "source.scss",
      "source.css.scss",
      "source.css.postcss"
    ],
    "jsonScopes": [
      "source.json"
    ],
    "graphQlScopes": [
      "source.graphql"
    ],
    "markdownScopes": [
      "source.md",
      "source.gfm",
      "text.md"
    ],
    "excludedGlobs": [],
    "whitelistedGlobs": [],
    "isDisabledIfNotInPackageJson": false,
    "isDisabledIfNoConfigFile": false
  },
  "prettierOptions": {
    "singleQuote": false,
    "bracketSpacing": true,
    "semi": true,
    "useTabs": false,
    "jsxBracketSameLine": false,
    "printWidth": 80,
    "tabWidth": "auto",
    "trailingComma": "none",
    "parser": "babylon"
  },
  "prettierEslintOptions": {
    "prettierLast": false
  }
}

OS: MacOS 10.13.2

I also experimented with

atom --profile-startup .

I've attached that profile:

CPU-20171228T150504.cpuprofile.zip

貢獻者指南

Slow Activation Time · prettier/prettier-atom#330 | Good First Issue