Page MenuHomePhabricator

Cache terminal width
ClosedPublic

Authored by joshuaspence on Jul 1 2015, 10:06 PM.
Tags
None
Referenced Files
F14048366: D13519.diff
Thu, Nov 14, 7:37 AM
F13971131: D13519.id32683.diff
Thu, Oct 17, 11:48 AM
Unknown Object (File)
Oct 4 2024, 4:42 PM
Unknown Object (File)
Sep 30 2024, 11:36 PM
Unknown Object (File)
Sep 24 2024, 5:17 PM
Unknown Object (File)
Sep 21 2024, 4:55 PM
Unknown Object (File)
Sep 21 2024, 7:43 AM
Unknown Object (File)
Sep 21 2024, 6:03 AM
Tokens
"Like" token, awarded by yelirekim.

Details

Summary

This maybe fixes T8576. Whilst running ./bin/search index --all I noticed that I ended up with 159,596 temporary directory which I believe are due to phutil_console_get_terminal_width() running too often.

Test Plan

N/A

Diff Detail

Repository
rPHU libphutil
Branch
master
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/console/format.php:190XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 7102
Build 7256: [Placeholder Plan] Wait for 30 Seconds
Build 7255: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Cache terminal width.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

Technically, we should listen for SIGWINCH (I think) and dirty this cache (because the user may resize the console while running the command), but this behavior is clearly worlds better than the prior behavior.

This revision is now accepted and ready to land.Jul 1 2015, 10:08 PM
This revision was automatically updated to reflect the committed changes.

Possibly we should do some false vs null stuff so that we cache "it didn't work", too, but whatevs.

Let's see if I can repopulate Elasticsearch in less than 48 hours now.