Fork me on GitHub
#re-frame
<
2022-08-21
>
fabrao17:08:47

hello all, what happen if I use global interceptor to validate specs and I have 2000 rows in re-frame database? It will block the UI until the end or it will run async?

p-himik17:08:35

Async things will still block the UI - because there's only one thread. If validating all data in a single go takes too much time, you can always split the data into batches and use the approach described at https://github.com/day8/re-frame/blob/master/docs/Solve-the-CPU-hog-problem.md

fabrao17:08:04

Thank you for the information, I'll read it and try to adapt it to my process.

👍 1
fabrao17:08:26

I think I have a problem with my spec structure, because it does the checking once and I can't split it into parts to been process as chunks.

p-himik17:08:48

If you have a coll-of or something like that, just remove that spec or make it not check the items themselves, and then check the items manually in batches.

fabrao17:08:22

humm, that is a possible way, thank you for giving me this idea