SnowdogApps / magento2-frontools

Set of front-end tools for Magento 2 based on Gulp.js
MIT License
430 stars 142 forks source link

Speedup style compilation #431

Closed MaxAlekseyev closed 3 years ago

MaxAlekseyev commented 3 years ago

Hello,

I'll new in frontools. Using Less as usual for M2, used scss for M1 3-4 ears ago. My setup is Win 10Prox64 -> WSL2 -> Ubuntu 20.04

gulp -v CLI version: 2.3.0 Local version: 4.0.2

node -v v14.18.1

I'm wondered on styles compilation time. Native M2 compilation takes 2.5 - 3.8 sec, but gulp compilation is about 2 minutes How can I speedup it?

image

MaxAlekseyev commented 3 years ago

Generally I need to compile just the project styles.css as usual. All other styles need to be compiled just for the firts time

Igloczek commented 3 years ago

It is hard to guess what is going on there, I don't even have any Windows setup to test it out, but I'd blame slow disc operations for this, since inheritance task is basically just "get list of files and create a bunch of symlinks", it usually not take more than 0.5s, while in your case it's 45s, so it's about 90 times slower.

BTW. What do you mean by "native compilation"? Magento can't compile SCSS files, so I'm not sure what you are referring to.

MaxAlekseyev commented 3 years ago

Native means LESS

Igloczek commented 3 years ago

As there is not much I can do about it, more than saying "let's check your setup disc operations performance", I'll close this issue for now.

But fell free to drop any comments if you will find something weird is going on.