Comments (9)
Updated to a version of globby that's only two years out of date rather than four, but it doesn't fix the problem.
from dmn.
Confirmed. The module also got like 10x faster with this change, great work!
from dmn.
By the way, I'm kind of tempted to rewrite the module, probably under a new name and with the only functionality of cleaning
node_modules
😉
If it matters, there's already other modules that do that like https://www.npmjs.com/package/modclean.
from dmn.
Looks like the problem was introduced some time relatively recently. I don't have the problem with npx [email protected] clean -f
but I see it in npx [email protected]
.
from dmn.
Much to my surprise, git bisect
reports this as the culprit: 782348b
Unfortunately, that's almost certainly not the code that caused the problem, but the code that exposes the problem in this situation.
from dmn.
Moved all .ts
and .map
files in the created react app to .pyc
so that the problem would manifest in older versions.
Now the problem is being reported in 857d6b5 which seems also like it almost certainly is not the cause, but simply exposing the issue in this situation....
This might go way back, and seems like it might be in globby
(which we're using a 4-year-old version of) or in the way globby
is used here.
from dmn.
FWIW, it's possible to workaround at least for the react case by increasing V8 heap size:
NODE_OPTIONS=--max_old_space_size=4096 npx dmn clean -f
I see the process peaking up to around 3GB, but then some GC takes place and it falls to 1.5GB for a while.
Probably need to attach a debugger and inspect the heap using a breakpoint.
from dmn.
globby
uses fast-glob
under the hood so I switched to fast-glob
since we're not using any of the features globby
adds. Then I updated to the latest fast-glob
. I had to add an option to the calls to glob()
. (That probably would have fixed it for globby
too.) Leak appears to be gone now. Will publish 2.2.1 with the fix soon. If you want to test against current master
, please do!
from dmn.
Fixed in be25a9b and released in [email protected]
.
from dmn.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dmn.