 # having to apply hundreds of patches when opening a string, and saves
 # space.   (Of course, having the complete history could also be
 # interesting...)
-DB_PATCH_SQUASH_THRESH = 50
+DB_PATCH_SQUASH_THRESH = 20
 
 async    = require('async')
 {EventEmitter} = require('events')

        opts = defaults opts,
            to_delete : required
            string_id : required
            last_sync    : required
            timestamp : required
            cb        : undefined
        @dbg("_squash_patches", misc.to_json(opts))
        async.series([
            (cb) =>
                # write big new patch

    _read_updates_from_db: (string_ids, age, squash_thresh, cb) =>
        if not @db?
            cb("database not initialized"); return
        if string_ids.length == 1
            @dbg("_read_updates_from_db", "querying updates for #{string_ids[0]}")
        else
            @dbg("_read_updates_from_db", "querying updates for #{string_ids.length} strings")
        where = {string_id:{'in':string_ids}}
        if age
            where.timestamp = {'>=' : cass.now() - age}
