                 if err
                     cb(err)
                 else
-                    @_process_updates updates, (err, new_updates) =>
+                    @_process_updates updates, squash_thresh, (err, new_updates) =>
                         # ignore err, since it would be in writing back
                         cb(undefined, new_updates)
 
-    _process_updates: (updates, cb) =>
+    _process_updates: (updates, squash_thresh, cb) =>
         #
         # updates is a list of {string_id:?,timestamp:?,patch:?,is_first:?} objects, where
         #

                string.applied_patches = {}

            # Apply unapplied patches in order.
            if string.last_sync == '' and patches.length > DB_PATCH_SQUASH_THRESH
                squash = true
                squash_time = new Date() - 1.2*TIMESTAMP_OVERLAP
            else


    get_string: (opts) =>
        opts = defaults opts,
            string_id     : required
            squash_thresh : DB_PATCH_SQUASH_THRESH
            cb            : required
        s = @strings[opts.string_id]
        if s?
            opts.cb(undefined, s)
