deadfile
deadfile copied to clipboard
Hangs on a big project
(develop *+$% u=)$ deadfile ./src/root.jsx
╭──────────────────────────────────────────────────────────────╮
│ │
│ Dead File! │
│ │
│ Simply find the unused files in your javascript project. │
│ Press --help for help. │
│ │
╰──────────────────────────────────────────────────────────────╯
✔ 3152 total assets found in base directory.
⠙ 16 imported assets found. /path/to/the/project/src/state/routes.jsx Killed
Tried two times. Every time I had to kill the process after 4-6 minutes.
Weirdly, I couldn't also terminate the process using Ctrl+c
so I killed it from the outside.
Both times the process was consuming 175-200% of CPU according to htop
.
System: Linux Ubuntu 18.04
/summon @M-Izadmehr
Not sure what the deal is, I even used the cli option that narrows it down to directory. I pointed it to a directory with 3 .tsx file (within a large project) and still stuck. The node process sucks up all my CPU processing power and my macbook sounds like it's about to take off.
Thanks a lot for taking the time and reporting this issue:) I actually tested this library on a super big library (over 200,000 lines of code), however, to be honest, I mostly checked with javascript, I guess this issue is only with typescript projects, I will try to look into this and resolve this. Even if it requires more process, it should not block the main process.
Hi
Same issue for me, in a javascript project (and I only test javascript, there is nothing else there).
I tried to mark only the specific directory and the index.js file, but nothing worked. It starts hanging at the "220 imported assets found." stage.
Same here :(
✔ 1540 total assets found in base directory.
⠦ 446 imported assets found. /Volumes/dev-image/.../RandomFile.js
Same here :(
✔ 582 total assets found in base directory.
⠋ 231 imported assets found. /path/to/file/File.jsx
Same:
✔ 1862 total assets found in base directory.
⠏ 695 imported assets found. /Users/sunway/Documents/Project/ShopDiary/src/component/SlideFilterComponent.js
I've got this working on a large project but it's reporting 90% of files as dead, while I know that they're included. This is using deadfile ./src/index.tsx
+1, can confirm, I'm also experiencing this in a semi-large project with a mixed JS(X)/TS(X) codebase.
This might be a duplicate of https://github.com/M-Izadmehr/deadfile/issues/4
Thanks for the report, Sorry I was not active in the past few months. I just made a small release (version 1.2), it should be resolved. Could you possibly confirm it in your project?
Using deadfile 1.2.2 with a React typescript codebase I had the same issue as simonv3
598 total files found!
595 dead files found!
Happy to report that our large project with ~560 files is now finishing
I encountered this issue and I resolved by this way:
- Replace all import 'alias' to your absolute path. eg: '.src/' -> '/Users/sunway/Documents/Project/ShopDiary/src/'
- Run deadfile command
- Delete all unused files
- Replace all absolute paths to your alias
@joepake What kind of alias do you use (webpack/npm/...)?