laravel-enso / enso

Laravel Vue SPA, Bulma themed. For demo login use `admin@laravel-enso.com` & `password` -
https://www.laravel-enso.com
MIT License
1.08k stars 277 forks source link

Slow performance with yarn serve and yarn build after Enso 4.4.0 #352

Closed robbykrlos closed 3 years ago

robbykrlos commented 3 years ago

This is a question.

Prerequisites

Description

Not sure how you guys run your environments and what OS you are using, but we noticed a slower performance in yarn build and yarn serve - especially in yarn serve with the new Enso 4.4.0 on Windows 10 Pro machines.

This makes it much more slower to observe changes in page when any line change will trigger a ~100 seconds rebuild, mostly hanging on 40%:

image

I've noticed some Vue files had some local styles defined, and thought by removing them will help - but was no significant performance change (at least for one correction).

If you have some ideas we're glad to have a starting point of investigation

robbykrlos commented 3 years ago

Not saying this is from 4.4.0 code changes - it might be from yarn + windows and triggered not because of recent changes.

In the same time I'm trying: https://stackoverflow.com/questions/40566222/yarn-5x-slower-on-windows

Disabling windows search indexing on your work folder and yarn cache folder as well as disabling windows defender completely or on a folder should give you significant performance boost. I've got 30-50% decrease on similar system with SSD drive, originally timings were as yours.

Disabling it on Yarn cache folder would also give you some speedup. Its location is shown by yarn cache dir command, %USERPROFILE%\Local Settings\Yarn\cache by default.

To disable search indexing on a folder, find it in Explorer, right click, then Properties - General - Advanced, uncheck the "Allow files in this folder to have contents indexed in addition to file properties" checkbox, then Apply the changes.

This performance issue already exists on yarn github (Oct'2016) and is still open to the moment: https://github.com/yarnpkg/yarn/issues/990

robbykrlos commented 3 years ago

Oh... this ain't looking good. Can be from AV:

https://github.com/yarnpkg/yarn/issues/990

image

aocneanu commented 3 years ago

Hi @robbykrlos,

We're only using linux & mac so we don't have any helpful input for W... other than switch it:)

robbykrlos commented 3 years ago

Ok, good. Will close this one. Will return with updates in case we find a solution for windows - may be useful for somebody with the same issue.

robbykrlos commented 3 years ago

Some updates on this issue : after some days, I had to clean-up node_modules, because of some corrupted files, and some weird errors, and using:

Clean-up yarn cache: yarn cache clean

Delete all node_modules inner folders. Use "Fast delete": https://stackoverflow.com/questions/28175200/how-to-delete-node-modules-deep-nested-folder-in-windows

Install RimRaf: npm install rimraf -g And in the project folder delete the node_modules folder with: rimraf node_modules

Install again all node_modules:

yarn install
yarn serve

Build and Serve are now working normally 👍