question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Recordings View slow to load

See original GitHub issue

I’m running Frigate with 4 cameras with 24/7 recording as well as having clips.

90 day recordings 14 day event retention

~655400 database entries for each camera found by using the following SQL

SELECT count(*), camera FROM recordings GROUP BY camera

I was able to improve the initial performance from camera recordings HTTP endpoint by adding a SQL index.

3 secs -> 895ms in my case.

CREATE INDEX "recordings_camera_start_time_asc" ON "recordings" (
	"camera",
	"start_time"	ASC
)

However, this still takes 30 seconds on the /api/[camera]/recordings endpoint.

I believe the issue is the usage of the strptime and lesser so the usage of strftime. https://github.com/blakeblackshear/frigate/blob/bb68a2405b32bb821c69dbe2d9bd256083c99bc1/frigate/http.py#L459-L487

I’ve not looked into it further as I was just made aware of this today by my partner when they were trying to look the recordings. I’ll be looking into it later as I’ve told them 30 seconds is expected right now.

My initial thoughts are to use arithmetic to calculate the diff instead or to implement some kind of pagination.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
blakeblackshearcommented, Mar 24, 2022

It’s already on my list of things to improve for the next release.

1reaction
blakeblackshearcommented, Jan 1, 2022

That endpoint is known to be slow. There is room for improvement, but I haven’t had time to look into it yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Screen Recordings to Identify Page Load Performance ...
Sometimes a picture (or in this case a video) is worth a thousand words, and identifying page load performance issues is no exception....
Read more >
Slow response when viewing recordings - Ubiquiti Community
I am having slow response when viewing recordings through the web interface on chrome or on the android app. I have unifi video...
Read more >
Slow and unusable live stream and trying to view recordings
The initial image from all cameras takes at least a minute to load. And then the image is frozen. After 5 minutes some...
Read more >
It takes forever to load/view a sentry recording. Anyone having ...
It's because of a large number of sentry clips. Clear your drive and it will resolve. Wish there was a way to partition...
Read more >
Recorded Video: Slow playback - LOREX Support
When viewing playback from a computer, smartphone, or tablet, connection issues and image quality settings can impact video streaming ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found