Repository navigation
Improve playlist import performance - #8062
Merged
FreeTubeBot merged 1 commit intoSep 22, 2025
Merged
Conversation
absidue
requested review from
a user,
MarmadileManteater,
PikachuEXE,
efb4f5ff-1298-471a-8973-3d47447115dc and
kommunarr
September 21, 2025 11:01
FreeTubeBot
enabled auto-merge (squash)
September 21, 2025 11:01
efb4f5ff-1298-471a-8973-3d47447115dc
approved these changes
Sep 21, 2025
kommunarr
approved these changes
Sep 21, 2025
PikachuEXE
approved these changes
Sep 22, 2025
PikachuEXE
added a commit
to NishPatel101/FreeTube
that referenced
this pull request
Sep 23, 2025
* development: (43 commits) Bump the eslint group across 1 directory with 4 updates (FreeTubeApp#8073) Bump electron from 38.1.0 to 38.1.2 (FreeTubeApp#8071) Bump sass from 1.92.1 to 1.93.0 (FreeTubeApp#8067) Bump lefthook from 1.13.0 to 1.13.1 (FreeTubeApp#8072) Bump swiper from 12.0.1 to 12.0.2 (FreeTubeApp#8070) Translated using Weblate (Italian) Translated using Weblate (Czech) Translated using Weblate (Hungarian) Translated using Weblate (German) Translated using Weblate (Estonian) Translated using Weblate (Breton) Translated using Weblate (German) Translated using Weblate (Chinese (Traditional Han script)) Improve playlist import performance (FreeTubeApp#8062) Translated using Weblate (Norwegian Bokmål) Translated using Weblate (Portuguese (Brazil)) Translated using Weblate (Chinese (Simplified Han script)) Translated using Weblate (Japanese) Handle lockup view videos without a view count (FreeTubeApp#8066) Add proxy login support (FreeTubeApp#7996) ...
PikachuEXE
added a commit
to PikachuEXE/FreeTube
that referenced
this pull request
Sep 23, 2025
* development: Bump the eslint group across 1 directory with 4 updates (FreeTubeApp#8073) Bump electron from 38.1.0 to 38.1.2 (FreeTubeApp#8071) Bump sass from 1.92.1 to 1.93.0 (FreeTubeApp#8067) Bump lefthook from 1.13.0 to 1.13.1 (FreeTubeApp#8072) Bump swiper from 12.0.1 to 12.0.2 (FreeTubeApp#8070) Translated using Weblate (Italian) Translated using Weblate (Czech) Translated using Weblate (Hungarian) Translated using Weblate (German) Translated using Weblate (Estonian) Translated using Weblate (Breton) Translated using Weblate (German) Translated using Weblate (Chinese (Traditional Han script)) Improve playlist import performance (FreeTubeApp#8062) Translated using Weblate (Norwegian Bokmål) Translated using Weblate (Portuguese (Brazil)) Translated using Weblate (Chinese (Simplified Han script)) Translated using Weblate (Japanese) Handle lockup view videos without a view count (FreeTubeApp#8066)
1 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Type
Related issue
FreeTubeAndroid#505
Description
This pull request improves the performance of playlist imports by reducing the number of store and database updates, along with a few other minor performance improvements. Previously we would add each new playlist to the store and database individually, now they are added in one go. If a playlist already exists we used to add each new video to the playlist individually and then an extra update at the end to update the playlist metadata, now we do one single store and database update for the entire playlist.
That means if the import contains more than one new playlist or one of the existing playlists receives at least one new video, there will be less store and database updates, which should be the case for most imports (I suspect that importing a completely identical playlist database is a very rare occurence).
Testing
Test that importing playlist databases still works correctly. If you want to verify that it does less updates to the database you can add some logging to the
Playlistsclass insrc/datastores/handlers/base.js.Desktop