Homec4science

Use PhutilRope as a buffer in Harbormaster BuildLogs

Authored by epriestley <git@epriestley.com> on Mar 1 2016, 16:15.

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.

{F1137115}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

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

Details

Committed
epriestley <git@epriestley.com>Mar 2 2016, 00:25
Pushed
aubortJan 31 2017, 17:16
Parents
rPHcf0957451ede: Slightly simplify the Harbormaster build log API
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH0daa9ad98758: Use PhutilRope as a buffer in Harbormaster BuildLogs (authored by epriestley <git@epriestley.com>).Mar 2 2016, 00:25