Skip to content
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

Hangs on a big project #6

Open
OnkelTem opened this issue Feb 17, 2020 · 15 comments
Open

Hangs on a big project #6

OnkelTem opened this issue Feb 17, 2020 · 15 comments

Comments

@OnkelTem
Copy link

OnkelTem commented Feb 17, 2020

(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

@OnkelTem
Copy link
Author

/summon @M-Izadmehr

@kamok
Copy link

kamok commented Feb 17, 2020

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.

@M-Izadmehr
Copy link
Owner

M-Izadmehr commented Feb 18, 2020

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.

@raphaellueckl
Copy link

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.

@subtleGradient
Copy link

Same here :(

✔ 1540 total assets found in base directory.
⠦ 446 imported assets found. /Volumes/dev-image/.../RandomFile.js 

@mustyoshi
Copy link

Same here :(

✔ 582 total assets found in base directory.
⠋ 231 imported assets found. /path/to/file/File.jsx 

@nsyujian
Copy link

Same:

✔ 1862 total assets found in base directory.
⠏ 695 imported assets found. /Users/sunway/Documents/Project/ShopDiary/src/component/SlideFilterComponent.js 

@simonv3
Copy link

simonv3 commented May 14, 2020

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

@laustdeleuran
Copy link

+1, can confirm, I'm also experiencing this in a semi-large project with a mixed JS(X)/TS(X) codebase.

@laustdeleuran
Copy link

This might be a duplicate of #4

@M-Izadmehr
Copy link
Owner

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?

@asavage1
Copy link

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!

@mustyoshi
Copy link

Happy to report that our large project with ~560 files is now finishing

@joepake
Copy link

joepake commented Oct 26, 2022

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

@M-Izadmehr
Copy link
Owner

@joepake What kind of alias do you use (webpack/npm/...)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests