atom/text-buffer — pull request #36 by maxbrunsfeld (2014-11-05 20:14:39+00:00)
Title: Add optional grouping interval to transactions

This allows the callers of `::transact` and `::beginTransaction` to opt-in to undo grouping by providing what I'm calling a 'grouping interval' - a number of milliseconds for which this transaction should be considered 'open for grouping'.

I've got this wired into Atom on [a branch](https://github.com/atom/atom/tree/mb-editor-grouped-undo). It feels pretty good, except that undo performance sometimes suffers when many transactions have been grouped. For example, after typing an entire sentence rapidly, hitting `cmd-z` can lag for a moment, presumably because so many `BufferPatches` are being inverted and then applied in sequence.

Let me know what you guys think.