Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor speed / performance on watch #1901

Closed
Puzo opened this issue Nov 22, 2022 · 1 comment
Closed

Poor speed / performance on watch #1901

Puzo opened this issue Nov 22, 2022 · 1 comment
Labels
invalid This doesn't seem right

Comments

@Puzo
Copy link

Puzo commented Nov 22, 2022

I am noticing, that speed / performance is pretty bad in my roots/sage project.

Node version: v16.16.0
NPM version: 8.18.0

That's my terminal output below.
As you can see, assets built in 84s. I also noticed that that js/app.js file is around 11 MB - why? It's original file basically.

> dev
> bud dev


◉  sage ./public [c1d2bb3d4fa2b1e60bc2]
│
├─ entrypoints
│ ├─ app
│ │ ├─ js/app.js                                     11.14 MB
│ │ └─ app.09a9dc35e0a018a75c5a.hot-update.js        10.95 MB
│ ├─ editor
│ │ ├─ js/editor.js                                 188.99 kB
│ │ └─ editor.09a9dc35e0a018a75c5a.hot-update.js    353 bytes
│ ├─ main
│ │ ├─ js/main.js                                     1.97 MB
│ │ └─ main.09a9dc35e0a018a75c5a.hot-update.js      349 bytes
│ ├─ gallery
│ │ ├─ js/gallery.js                                161.45 kB
│ │ └─ gallery.09a9dc35e0a018a75c5a.hot-update.js   355 bytes
│ ├─ switch
│ │ ├─ js/switch.js                                 163.06 kB
│ │ └─ switch.09a9dc35e0a018a75c5a.hot-update.js    353 bytes
│ └─ form
│   ├─ js/form.js                                   160.56 kB
│   └─ form.09a9dc35e0a018a75c5a.hot-update.js      349 bytes
│
├─ assets
│
└─ compiled 216 modules in 84s 427ms

ℹ server
╷
├─ internal: http://localhost:3000
├─ external: http://192.168.0.22:3000

… watching project sources (and 94 other files)

My package.json file:

{
  "name": "sage",
  "private": true,
  "browserslist": [
    "extends @roots/browserslist-config/current"
  ],
  "engines": {
    "node": ">=16.0.0"
  },
  "scripts": {
    "dev": "bud dev",
    "build": "bud build --clean",
    "doctor": "bud doctor",
    "help": "bud help",
    "translate": "yarn translate:pot && yarn translate:update",
    "translate:pot": "wp i18n make-pot . ./resources/lang/sage.pot --include=\"app,resources\"",
    "translate:update": "for filename in ./resources/lang/*.po; do msgmerge -U $filename ./resources/lang/sage.pot; done; rm -f ./resources/lang/*.po~",
    "translate:compile": "yarn translate:mo && yarn translate:js",
    "translate:js": "wp i18n make-json ./resources/lang --pretty-print",
    "translate:mo": "wp i18n make-mo ./resources/lang ./resources/lang"
  },
  "devDependencies": {
    "@roots/bud": "^6.6",
    "@roots/bud-postcss": "^6.6",
    "@roots/bud-sass": "^6.6",
    "@roots/bud-tailwindcss": "^6.6",
    "@roots/sage": "^6.6"
  },
  "dependencies": {
    "@fortawesome/fontawesome-free": "^6.2",
    "@splidejs/splide": "^4.1.4",
    "autoprefixer": "^10.4.13",
    "counterup2": "^2.0.2",
    "flickity": "^3.0.0",
    "glightbox": "^3.2.0",
    "intersection-observer": "^0.12.2",
    "postcss": "^8.4.19",
    "postcss-nesting": "^10.2",
    "scrollama": "^3.2.0",
    "tailwindcss": "^3.2.4"
  }
}

Any ideas on what am I missing or doing wrong?

Thanks, best regards!

@Puzo Puzo changed the title Poor speed / performance build Poor speed / performance on build Nov 22, 2022
@Puzo Puzo changed the title Poor speed / performance on build Poor speed / performance on watch Nov 23, 2022
@retlehs
Copy link
Member

retlehs commented Nov 23, 2022

Hello! You're welcome to start a topic on https://discourse.roots.io/ for questions or support, but the issues on this repo are meant for reproducible bug reports.

As you can see, assets built in 84s. I also noticed that that js/app.js file is around 11 MB - why? It's original file basically.

The "why?" part of this question really warrants some more troubleshooting on your end first. You've added at least 10 dependencies and likely modified other files and added files, yeah? Sage doesn't ship with 10MB of assets — your project is not basically the original like you're suggesting.

I'd redirect this question back to you: Why?

@retlehs retlehs closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2022
@retlehs retlehs added the invalid This doesn't seem right label Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants