mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:40:15 +00:00
Merge pull request #14591 from annando/animated-gif
Improve the speed for blurhash generation
This commit is contained in:
commit
9a8554e40a
2 changed files with 2 additions and 2 deletions
|
@ -770,7 +770,7 @@ class Image
|
||||||
*/
|
*/
|
||||||
public function getBlurHash(): string
|
public function getBlurHash(): string
|
||||||
{
|
{
|
||||||
$image = New Image($this->asString(), $this->getType(), $this->filename, false);
|
$image = clone($this);
|
||||||
if (empty($image) || !$this->isValid()) {
|
if (empty($image) || !$this->isValid()) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -295,7 +295,7 @@ class Jetstream
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (microtime(true) - $timestamp > 2) {
|
if (microtime(true) - $timestamp > 2) {
|
||||||
$this->logger->notice('Commit processed', ['duration' => round(microtime(true) - $timestamp, 3), 'time' => date(DateTimeFormat::ATOM, $data->time_us / 1000000), 'did' => $data->did, 'operation' => $data->commit->operation, 'collection' => $data->commit->collection]);
|
$this->logger->notice('Commit processed', ['duration' => round(microtime(true) - $timestamp, 3), 'drift' => $drift, 'capped' => $this->capped, 'time' => date(DateTimeFormat::ATOM, $data->time_us / 1000000), 'did' => $data->did, 'operation' => $data->commit->operation, 'collection' => $data->commit->collection]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue