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
serialize does not seems to work #78
Comments
From my understanding, the goal of neomake_serialize is not to cancel previous unfinished jobs. If you have two makers e.g. Previous jobs are indeed not cancelled when :Neomake is called again. We could add a separate option to do this. |
@Neki Okay, but here in my first use case I save 4 times my files and it launch 4 pylint in parallel. Is it normal with neomake_serialize set to 1? |
Yes, because saving four times your file trigger four separate In fact, if you have only one checker for your file (in this case, pylint), |
If you have two configured makers (pylint and frosted for instance), then this option prevents |
Ok I understood. I thought that neomake-serialize serialized different jobs, but no it serialized in a job the different makers. How about :
And a new option that would do smth like this:
|
Actually there is a bug here, but not with the serialize feature as @Neki correctly pointed out. When Neomake runs a maker, it should cancel any outstanding jobs created by that maker. The intent is that there is only at most one job per maker active at any given time (and that the job is always the most up-to-date one). In the code (see earlier link), it looks like we are canceling the old job shortly after creating the new one, which should perhaps be corrected. Beyond that, I'm not sure what the issue is at the moment. |
My issue is that if I save 4 times my file I have 4 pylint running for several seconds. And I just want the last one to be running. When you say shortly after, does it means seconds? |
After reading the code again (sorry I missed the part where jobs should be cancelled), it means "after a few lines of code" - so it is more like milliseconds. I would investigate but I am bitten by neovim/neovim#2309 too, so neomake does not work at all for me now. |
Let me know how this fix works for you. The new job kills the old job, and then waits until the old job exits and is cleaned up before running. It seems to be working fine for me and should guarantee that you never have two jobs from the same maker going at once. |
The fix works for me. Sorry for the late response I was in vacation. Thanks ! |
I am trying to use the plugin with pylint checkers and I have some problems.
I am trying to schedule a checker job each time I save my file.
Since I am working on huge python files, it takes 10 second for pylint to do the job. (100% CPU from pylint while working)
If in I do in 1 second:
It will launch and run 4 jobs (4 pylint running => 4 * 100% CPU)
Since I set neomake_serialize to 1 I expected to have only one job running.
Here is my vimrc
Moreover, I was wondering if it was possible to cancel a job when a new job start.
My use case would be:
Maybe I should create an issue for that?
The text was updated successfully, but these errors were encountered: