coala-vim icon indicating copy to clipboard operation
coala-vim copied to clipboard

Plugin runs slower than native coala

Open perplexedfingers opened this issue 8 years ago • 5 comments

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?

perplexedfingers avatar Oct 08 '16 09:10 perplexedfingers

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.

sils avatar Oct 08 '16 09:10 sils

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

RohanVB avatar Mar 15 '17 20:03 RohanVB

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).

joeytwiddle avatar Oct 05 '17 00:10 joeytwiddle

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?)

adtac avatar Oct 05 '17 03:10 adtac

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.

sils avatar Oct 06 '17 05:10 sils