1

Im using Iron:router and meteor-node-csv, after uploading a file i want to read each row of it and insert it on a collection, but when i process the file the whole web freeze (buttons dont respond). Time ago this same code worked 100% fine, after some upgrades it started working like this.

So, after a lot of testing a partner found that the waitOn is a flag here.

If i process the file and try to navigate to a route having a subscription to any other collections it freeze.

If i process the file and try to navigate to a route without a subscription it works perfect

Ethaan
  • 11,291
  • 5
  • 35
  • 45
cristiandley
  • 559
  • 1
  • 5
  • 19

1 Answers1

0

If your file is big, then reactivity is causing this issue. There are variations of that on stackoverflow in a few questions. My recommendation, described here, is to disable reactivity while processing data. You can do that using a "guard" around reactive elements, e.g., using a session variable as described in the linked answer.

Community
  • 1
  • 1
Christian Fritz
  • 20,641
  • 3
  • 42
  • 71
  • Its not a solution, because i have more than 30 subscribes over my app (diferent sections). And more than 30 users over the same collection on diferent sections. Im becoming crazy with this issue hehe. What im doing right now is to show a POP UP blocking the entire operations while file is processed (which is not the best but... meanwhile). – cristiandley Apr 17 '15 at 15:36
  • I don't understand what the number of subscribers has to do with that, other than perhaps the fact that you'd have to potentially change a lot of templates to add the guard. If you find a better solution, please let me know. I'm actually quite curious. So far I've not seen a better solution for this. – Christian Fritz Apr 17 '15 at 16:25