Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use filesystem instead of sqlite for thumbnails #1141

Merged
merged 4 commits into from
Jul 31, 2021
Merged

use filesystem instead of sqlite for thumbnails #1141

merged 4 commits into from
Jul 31, 2021

Conversation

ddennedy
Copy link
Member

@ddennedy ddennedy commented Jul 30, 2021

NOTE: You might want to make a backup copy of your db.sqlite3 in the Shotcut App Data directory before running this. It deletes the database after it converts it all to files the first time the thumbnails are used.

Check this out to remove using a database for storing the thumbnail and waveform cache. The database cannot be opened by multiple instances of Shotcut - certainly not on Windows. It hope it improves the performance of running multiple instances of Shotcut and fixes issues where waveforms are not updating.

@ddennedy ddennedy requested a review from bmatherly July 30, 2021 02:17
@bmatherly
Copy link
Member

Looks good to me.

In testing, the conversion worked properly for me and new waveform thumbnails were created successfully.

I am not sure how to measure performance improvement. Do you have any ideas?

I notice that clips without audio result in a 91kB file that is 1x1 px. I suppose that is on purpose to signal that the file has already been checked?

@ddennedy
Copy link
Member Author

To be honest, I have trouble reproducing the performance issues reliably. I do know that you can see database errors in the log - at least on Windows - so it is unable to reliably read and write the cache, which is obviously not good. I put this into a branch to test more easily on other machines before deciding to merge. So, I thought I'd make a PR to have you review it.

I notice that clips without audio result in a 91kB file that is 1x1 px

That is not intentional but a byproduct of what happens when requesting waveform. I do not think it is a new behavior. We can probably prevent this by making the waveform task do nothing when audio_index = -1.

Removing the db makes it such that running an older version does not
utilize the old cache. Sure, the older version will not be able to
utilize new cache data, but it is a bummer to wait for waveforms when
running an older version against existing media. Also, if a person
downgrades.
@ddennedy ddennedy merged commit 559c2d2 into master Jul 31, 2021
@ddennedy ddennedy deleted the remove_db branch July 31, 2021 23:26
@ddennedy ddennedy added this to the v21.08 milestone Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants