coala / coala-vim

Vim plugin for coala
http://coala-analyzer.org/
GNU Affero General Public License v3.0
29 stars 7 forks source link

Plugin runs slower than native coala #19

Open perplexedfingers opened 8 years ago

perplexedfingers commented 8 years ago

It takes about 3 seconds to run in command line, but it will be like a minute when using the plug-in. Is it scanning only the current file or not?

sils commented 8 years ago

Hm, the plugin should definitely be faster as it only checks the current file - though I guess it may affect caching. @adtac will know more.

RohanVB commented 7 years ago

Just ran it on the test.py file in the repo; took about the same time (~3secs) Also tested it with SpaceConsistencyBear.

joeytwiddle commented 7 years ago

Theory: Does it search for all the files under your cwd, but only take action on the limited file?

If your cwd has 'node_modules' below it, listing all those files could take a while (if not yet cached).

adtac commented 7 years ago

Caching will be affected: when you run it on one file and then on another, the --files field will change. This is essentially a change in settings. Therefore, the cache will be flushed and rebuilt. However, running coala on the same file over and over again should be fast enough.

Theory: Does it search for all the files under your cwd, but only take action on the limited file?

It's definitely possible: does giving --files main.py search for ALL main.pys? (BTW, do we use --files?)

sils commented 7 years ago

I'd guess we use --limit-files, we should. I remember that indeed the file listing was a huge performance hit in the past, we've tweaked on that a bit but it's far from perfect still so that might be the issue.