I learned that in Node.js you yield
in between long computations to prevent the server from blocking. How do you achieve this on Meteor? Are there techniques for al
Meteor uses Fibers which behave a little different than usual Node.js code. I believe there's no need to yield manually. Instead, you may want to use this.ublock()
method on the server side – see this awesome article that explains it in details.
If you're doing something really heavy on the client side (like calculating Mandelbrot set), split the execution with defers:
_.defer(function() {
doSomethingQuiteLong();
_.defer(function() {
doSomethingQuiteLongAgain();
...
});
});