HomePhabricator

Use PhutilRope as a buffer in Harbormaster BuildLogs

Description

Use PhutilRope as a buffer in Harbormaster BuildLogs

Summary:
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.

Test Plan:

  • Ran a build, saw logs.
  • Set chunk size very small, ran build, saw logs, verified small logs in database.

Screen Shot 2016-03-01 at 12.05.41 PM.png (432×475 px, 42 KB)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15375

Details

Provenance
epriestleyAuthored on Mar 1 2016, 3:15 PM
epriestleyPushed on Mar 1 2016, 11:25 PM
Reviewer
chad
Differential Revision
D15375: Use PhutilRope as a buffer in Harbormaster BuildLogs
Parents
rPcf0957451ede: Slightly simplify the Harbormaster build log API
Branches
Unknown
Tags
Unknown
Tasks
T10457: Improve Harbomaster/Drydock UI/UX before release
Build Status
Buildable 10936
Build 13498: Run Core Tests