Page MenuHomePhabricator

Use PhutilRope as a buffer in Harbormaster BuildLogs
ClosedPublic

Authored by epriestley on Mar 1 2016, 8:06 PM.
Tags
None
Referenced Files
F15398886: D15375.id37079.diff
Mon, Mar 17, 1:52 AM
F15398885: D15375.id37069.diff
Mon, Mar 17, 1:52 AM
F15398884: D15375.id.diff
Mon, Mar 17, 1:52 AM
F15398883: D15375.diff
Mon, Mar 17, 1:52 AM
F15386609: D15375.id37069.diff
Sat, Mar 15, 12:57 AM
F15375623: D15375.id37079.diff
Wed, Mar 12, 11:35 PM
F15375622: D15375.id37069.diff
Wed, Mar 12, 11:35 PM
F15375621: D15375.id.diff
Wed, Mar 12, 11:35 PM
Subscribers
None

Details

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)

Diff Detail

Repository
rP Phabricator
Branch
dry15
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/harbormaster/storage/build/HarbormasterBuildLog.php:127XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 10926
Build 13482: Run Core Tests
Build 13481: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Use PhutilRope as a buffer in Harbormaster BuildLogs.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Mar 1 2016, 9:20 PM
This revision was automatically updated to reflect the committed changes.