1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-03 04:02:43 +01:00
phorge-phorge/src/applications/harbormaster
epriestley 9cf3b3bbf8 Count lines in build log slices more cheaply
Summary:
See PHI766. Ref T13164. Build log chunk processing does a `preg_split()` on slices, but this isn't terribly efficient.

We can get the same count more cheaply by just using `substr_count()` a few times.

(I also tried `preg_match_all()`, which was between the two in speed.)

Test Plan:
- Used `bin/harbormaster rebuild-log --id X --force` to rebuild logs. Verified that the linemap is identical before/after this change.
- Saw local time for the 18MB log in PHI766 drop from ~1.7s to ~900ms, and `preg_split()` drop out of the profiler (we're now spending the biggest chunk of time on `gzdeflate()`).

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13164

Differential Revision: https://secure.phabricator.com/D19545
2018-07-30 08:25:17 -07:00
..
__tests__ As Harbormaster logs are processed, build a sparse map of byte offsets to line numbers 2018-02-26 17:56:52 -08:00
application Add a UI element for reviewing older generations of Harbormaster builds 2018-03-13 16:15:11 -07:00
artifact Explicitly add rel="noreferrer" to all external links 2018-02-17 17:46:11 -08:00
autoplan Give "Arcanist Client Results" a more clear name 2015-09-09 19:18:08 -07:00
capability Add spelling TODOs 2017-10-09 11:56:53 -07:00
conduit Provide API read access to Harbormaster build logs 2018-02-28 12:36:03 -08:00
constants Add an "Abort Older Builds" build step to Harbormaster 2018-04-17 14:59:47 -07:00
controller Support logged-out access to more Harbormaster controllers 2018-06-04 10:11:25 -07:00
customfield Allow "Wait for Message" to be unset on build plans 2016-11-22 14:02:37 -08:00
editor Update EditEngine for two column 2016-03-28 09:18:55 -07:00
engine When publishing buildables in Differential, ignore autobuilds (local lint and unit) 2018-04-03 11:02:12 -07:00
engineextension Subsume 'harbormaster.querybuilds' with a modern search API method 2016-07-31 21:44:22 +00:00
event Reduce the severity of policy fatals when building the Harbormaster "build status" element 2018-03-16 13:27:57 -07:00
exception Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
future Allow Harbormaster to run commands on Drydock working copies 2015-09-25 10:43:32 -07:00
herald Don't run Herald build and mail rules when they don't make sense 2017-10-27 08:44:12 -07:00
interface When publishing buildables in Differential, ignore autobuilds (local lint and unit) 2018-04-03 11:02:12 -07:00
management Move structural build publishing logic to BuildEngine, provide "bin/harbormaster publish" 2018-04-03 10:58:27 -07:00
phid Add a very basic standalone view for build logs with a "Download Log" button 2018-02-26 17:53:10 -08:00
query Add an "Abort Older Builds" build step to Harbormaster 2018-04-17 14:59:47 -07:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
step Pass full Harbormaster URIs to Buildkite 2018-04-30 22:32:50 -07:00
stepgroup Add an "Abort Older Builds" build step to Harbormaster 2018-04-17 14:59:47 -07:00
storage Count lines in build log slices more cheaply 2018-07-30 08:25:17 -07:00
typeahead Search builds based on who kicked them off 2016-07-31 20:54:44 +00:00
view Fix the legacy "25, 50, 100, unlimited" Harbormaster log links to respect generation selection 2018-04-13 11:55:44 -07:00
worker Stop build target start times from being overwritten on reentry 2018-04-27 12:25:45 -07:00