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
Unknown Object (File)
Tue, Nov 19, 10:03 AM
Unknown Object (File)
Wed, Oct 30, 6:44 AM
Unknown Object (File)
Wed, Oct 23, 2:04 AM
Unknown Object (File)
Tue, Oct 22, 11:54 PM
Unknown Object (File)
Oct 14 2024, 8:15 PM
Unknown Object (File)
Oct 13 2024, 8:50 PM
Unknown Object (File)
Sep 23 2024, 10:54 PM
Unknown Object (File)
Sep 12 2024, 8:23 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.