Ref T10457. Currently, every append() call necessarily generates queries, and these queries are slightly inefficient if a large block of data is appended to a partial log (they do about twice as much work as they technically need to).
Use PhutilRope to buffer append() input so the logic is a little cleaner and we could add a rule like "flush logs no more than once every 500ms" later.