ios - Hold or batch Realm notifications? -


i have scenario i'll doing many updates end effecting result vc listening to. ideally i'd send 1 notification @ end of batch

a few questions:

  1. is possible batch notifications, rather having every update send notification?
  2. is right way think it? should stop listening notifications when batch starts , start listening again when it's done?

notifications occur @ end of write transaction, easiest thing case perform of work in 1 transaction (i'd recommend doing on background thread), , close when want notification fired.

this general recommended approach since guarantee fine-grained change indexes coalesced singular notification @ end.

if don't care fine-grained change indexes (i.e., you're doing complete refresh on each notification), consider setting flag disregards notifications until you've completed work.

you remove notification block, mean there'd significant amount of tear-down, , re-setup work you'd have each time.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -