daidodo / format-imports

JavaScript and TypeScript Import/Export Sorter
MIT License
47 stars 2 forks source link

Taking very long, no idea why #3

Closed jasonkuhrt closed 3 years ago

jasonkuhrt commented 3 years ago

Describe the bug

Upon running format-imports it hangs

To Reproduce

Run yarn format-imports on a large project at the root.

Is there a debug mode?

daidodo commented 3 years ago

@jasonkuhrt - Thanks for the feedback!

Could you share your options after format-imports?

daidodo commented 3 years ago

I tested on vscode source and it's slower than I thought:

$ time format-imports -c src/
Checked 2275 files, of which:
  340 files passed.
  1935 files have formatting issues.

real    6m35.349s
user    3m44.735s
sys     2m28.019s

Will try to address the issue. Thanks!

daidodo commented 3 years ago

Addressed an issue that tsconfig.json loading was super slow.

Published a new release v2.2.2.

Checked 2275 files, of which:
  340 files passed.
  1935 files have formatting issues.

real    1m43.383s
user    1m35.699s
sys     0m9.932s

Please try it and tell me if there are still issues. Thanks!

jasonkuhrt commented 3 years ago

Thanks will try!

daidodo commented 3 years ago

@jasonkuhrt - I'll resolve this issue if you don't have any more questions.