         # will later implement things to make faster.  If this database sync thing
         # turns out to be sensible.
         #  SIMPLIFIED: ignore is_first and never trim.
+        @dbg("_process_updates", "process #{updates.length} updates")
         new_patches = {}
         for update in updates
             update.timestamp = update.timestamp - 0  # better to key map based on string of timestamp as number

# Times below are in milliseconds.

# Polling parameters:
INIT_POLL_INTERVAL     = 3000
MAX_POLL_INTERVAL      = 30000   # TODO: for testing -- for deploy make longer!
POLL_DECAY_RATIO       = 1.3


    poll_for_updates: (interval=INIT_POLL_INTERVAL) =>
        retry = (interval) =>
            next_interval = Math.max(INIT_POLL_INTERVAL,Math.min(MAX_POLL_INTERVAL, POLL_DECAY_RATIO*interval))
            @dbg("poll_for_updates", "waiting #{next_interval}ms...")
            setTimeout((()=>@poll_for_updates(next_interval)), interval)

        if misc.len(@strings) == 0
