fix to avoid to much concurrent operations#262
fix to avoid to much concurrent operations#262chrisgorgo merged 3 commits intobids-standard:masterfrom
Conversation
|
Nice. This looks good to me. Two minor things. Any of the process.nextTick calls that take a generic async callback don't need the extra anonymous function. For example this could be written as this And lastly, for the current npm publishing work flow to work you'll need to up the version number in the package.json file. Thanks for the PR. |
|
Thanks! |
|
Oh.. I actually meant the version of the bids validator needs to be changed. So in package.json the Probably a "minor" version bump. The dependency version updates are probably still a good thing though and it looks like tests are still passing with them. |
|
OK |
|
Is this ready to merge? |
|
For me yes: it is working, and it solved the issues that I encountered with a big number of files. |
There was a problem hiding this comment.
I just realized one big issue with this approach is process.nextTick won't exist in the browser. It looks like there are some polyfills, but they don't seem to be widely used so I'm unsure right now what other problems they might pose.
Here's one example https://www.npmjs.com/package/browser-next-tick
@ntraut have you tried this with keeping the async limit, but not using process.nextTick()?
|
As you want but I think this issue is outdated because I just tested the browser version and it worked. |
|
@ntraut Thanks for testing this in the browser. I just dug into the issue a little deeper and it looks like browserify (a part of our web build flow) automatically shims So @chrisfilo I'm good with these changes now with the caveat that this means the validator will continue to work in our applications and in node, but anyone else using it in the browser will need to make sure they have a shim for We could also build a shim into the validator. |
|
Thanks for looking into this. Wouldn't everyone use browserify before trying to use it in the browser? By saying our applications do you also include "http://incf.github.io/bids-validator"? |
|
Yea by "our applications" I mean the gh-pages and the crn_app repo. There are a number of ways to bundle a library like this for the web, but yes most will likely include shims for various node specifics by default. I just checked and webpack also includes a shim. |
For correcting issue #261: Big dataset problem.