The SASS @imports are organised on folder level now, so globbing is no longer needed.

Also it can boost the sass compiling runtime by up to 1500% and probably even more in projects that use imports all-over. But, it could also be considered as bad practice ... here an article explaining mixin vs. include.

I would vote for removing, what do you think?

Comments

ytsurk created an issue. See original summary.

ytsurk’s picture

Issue summary: View changes
pivica’s picture

+1 from my side, make sense we remove this.

Related to optimization improvements i've just created #3045552: Evaluate pnpm package manager, what do you think?

pivica’s picture

> But, it could also be considered as a bad practice ... here an article explaining mixin vs. include.

Read the article, i can't figure out how it is related to this issue, but this part is interesting:

And performance isn’t really affected by repeating media queries. See: https://helloanselm.com/writings/web-performance-one-or-thousand-media-q... and http://aaronjensen.github.io/media_query_test/ (thanks Andrei Fedosjeenko).

This would mean that it does not matter if we are grouping media queries or not, which is related to #3042171: Decide what to do with css-mqpacker npm package is not maintained any more which would mean we can remove css-mqpacker, right?

ytsurk’s picture

Yeah, the article is about media queries and imo we can also strip mqpacker.

But it's also about mixins vs. imports. In this project where I use a lot of imports, i'm thinking of moving to mixins .. this will reduce the possibility for mixups caused by vice-versa imports and also make it again compile faster also with globbing.

So the question here is, do we support "globbing" (using import paths with /**/ et al), or force per file/folder imports?

pivica’s picture

Sorry, i don't follow any more fully.

> But it's also about mixins vs. imports. In this project where I use a lot of imports, i'm thinking of moving to mixins ..

Not sure what do you mean here. Using fewer imports and use mixins instead? Can we get some high-level code examples of how this would work?

> So the question here is, do we support "globbing" (using import paths with /**/ et al), or force per file/folder imports?

Originally this issue is about "globbing is no longer needed.". Not sure why this question here now?

We do not use globing at all and it is fine we remove it in base themes. If some custom project wants to use globbing its free to add it on custom level i guess. Does this make sense?

pivica’s picture

Status: Active » Needs review
StatusFileSize
new6.22 KB

Our generator workflow and sass inheritance would probably not like using of gulp-sass-glob. So this and the fact that we are not using it means we should definitely remove it.

While working on this i figured that there are additional node libraries that we are not using. Here is a full list of libraries that are removed:

- eslint
- gulp-cached
- gulp-changed
- gulp-if
- gulp-notify
- gulp-sass-glob
- gulp-svgstore
- gulp-uglify
- node-sass-import-once
- postcss-scss
- pump

All in total, with dependencies, this is 85 libraries that are removed. I've measured compilation time before and after this change for complex client theme and compilation times are more or less the same - no measurable speed improvements.

ytsurk’s picture

Not so in topic, but it's good to remove unused dependencies.
Sad, that there is no performance boost :(

Maybe I can give it a try, but I do not promise ..

Have good Rauhnächte BTW!

pivica’s picture

> Have good Rauhnächte BTW!

Thx :)

  • pivica committed 47ce6ef on 8.x-1.x authored by ytsurk
    Issue #3045550 by pivica, ytsurk: Removal of gulp-sass-glob
    
pivica’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.