bealex / SwiftLintAppCode

Provides highlighting of the SwiftLint errors in the AppCode
MIT License
52 stars 8 forks source link

"Run Inspection by Name" takes much more time to run than command line #26

Closed mekarthedev closed 6 years ago

mekarthedev commented 7 years ago

When running time swiftlint lint --no-cache in command line, it takes 6 seconds on my project. When running with Run Inspection by Name..., it takes about 4 minutes. The custom files scope is set to be the same as in .swiftlint.yml. Watching at linting progress, can't see any unexpected files to be linted.

SwiftLint plugin v1.8, AppCode 2017.2 (172.3317.89), MacBook Pro 2015, macOS 10.12.5, Xcode 8.2.1.

Seems like the plugin runs a new swiftlint process for each file in scope. Maybe there is some way it could be optmized? E.g. if, supposing, AppCode forces you to lint files one by one then maybe there is a way to keep a single swiftlint process alive and just feed it's stdin? I'm not a plugin developer :)

bealex commented 7 years ago

Thanks for the issue!

I'm investigating the same thing right now. Should be better in the next version.

bealex commented 6 years ago

It is still slower, but should be OK now. Can you confirm?

mekarthedev commented 6 years ago

Much faster now. 10 vs 30 seconds.

But now it seems to ignore my .swiftlint.yml settings. Is it related to #32? I'm on v1.10.2

bealex commented 6 years ago

Yes, there is a bug in current version, sorry for that. Fix should be available in a day or so.