Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15408877
D9363.id22295.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
779 B
Referenced Files
None
Subscribers
None
D9363.id22295.diff
View Options
diff --git a/src/console/PhutilConsoleProgressBar.php b/src/console/PhutilConsoleProgressBar.php
--- a/src/console/PhutilConsoleProgressBar.php
+++ b/src/console/PhutilConsoleProgressBar.php
@@ -33,6 +33,7 @@
private $drawn;
private $console;
private $finished;
+ private $lastUpdate;
public function setConsole(PhutilConsole $console) {
$this->console = $console;
@@ -59,6 +60,11 @@
}
private function redraw() {
+ if ($this->lastUpdate + 0.2 > microtime(true)) {
+ // We redrew the bar very recently; skip this update.
+ return;
+ }
+
if ($this->finished) {
return;
}
@@ -85,6 +91,8 @@
return;
}
+ $this->lastUpdate = microtime(true);
+
if (!$this->drawn) {
$this->drawn = true;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 2:04 AM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7654100
Default Alt Text
D9363.id22295.diff (779 B)
Attached To
Mode
D9363: Don't redraw the console progress bar every time
Attached
Detach File
Event Timeline
Log In to Comment