-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Performance degradation in v11 when using "mixinsFiles" #167
Comments
сс @ziebam |
this particular pattern seems to avoid all of tinyglobby's perf optimizations, performance should greatly improve once something like SuperchupuDev/tinyglobby#23 gets implemented, will take a look at it |
@RubenStoesser i think i've managed to solve the perf issue in a simpler way, can you add the following line to your "resolutions": {
"tinyglobby": "https://pkg.pr.new/tinyglobby@f819a2a"
}, |
Hey @SuperchupuDev, thank you for the fast response! Unfortunately, the change does not seem to have fixed the issue :/ Just an FYI the same degradation also occurs with a single entry in e.g. "mixinsFiles": ["src/**/*.mixins.css"] |
interesting, will investigate more. meanwhile can you go to |
oh, another thing I missed, @RubenStoesser if you are using "overrides": {
"tinyglobby": "https://pkg.pr.new/tinyglobby@f819a2a"
}, |
With this config: "mixinsFiles": ["src/Shared.mixins.css", "src/Global.mixins.css"] it logs With this: "mixinsFiles": ["src/**/*.mixins.css"] it logs I also added a console.time("glob time");
let files = globSync(globs, {
caseSensitiveMatch: false,
expandDirectories: false
})
console.timeEnd("glob time");
As a comparison using
And with
So it looks like the optimisation has definitely improved performance for cases explicitly referencing single files but not when using the wildcard |
that doesn't sound right, it should only log once. unless this library calls the
i don't think this optimization can be expanded to |
i've opened #168 to speed up globbing in this library and potentially solve the performance issue you're seeing, i couldn't reproduce the glob function getting called more than once though which sounds like this library's issue and not |
@RubenStoesser try |
Hi @ai, Unfortunately, completely ignoring |
Agree. It will be cool if @SuperchupuDev will find a better improvement. We can also use native |
i've pushed another small improvement that can speed up more cases, you can test it by having this in your "resolutions": {
"tinyglobby": "https://pkg.pr.new/tinyglobby@0fcb1b3"
}, (use this optimizes usage of |
hi @RubenStoesser, the performance issues you reported around the two patterns in the initial comment should have been fixed in today's |
Hi @SuperchupuDev, the For example a file located at However, even using that pattern I unfortunately still do not see a significant performance boost (in version |
right, sorry about that. i think i've finally figured it out and just managed to optimize
didn't you say here #167 (comment) that performance did increase for patterns without also, try version |
Sorry, should have clarified here. The performance is slow when referencing multiple specific files and one of those files is located in the e.g. the same performance test as used in previous comments with one file in
and multiple files:
This was now using Interestingly, referencing a single glob pattern is now definitely faster with
However, adding a second entry to the |
Hi,
we are using PostCSS with this plugin and vite and have noticed a pretty significant performance degradation starting with v11 when using the
mixinsFiles
option.As soon as either multiple files are referenced or a glob is used responses from vite dev server are stuck in
pending
state for a long time when first starting the dev server.Examples:
using 11.0.1
using 10.0.1
As long as only one file (without any glob patterns) is referenced everything seems to work as before. However, when referencing multiple files this changes:
using 11.0.1
using 10.0.1
As shown in the screenshots the first load of localhost takes nearly 23 seconds when using
v11.0.1
in comparison to 56ms inv10.0.1
. Nothing else changed between the two runs. It also doesn't matter whether the referenced files exist or not.The only real difference I can see in the two versions is the change from
fast-glob
totinyglobby
so it seems like this has made some kind of impact.Any help on how to fix this issue would be much appreciated.
The text was updated successfully, but these errors were encountered: