-
Notifications
You must be signed in to change notification settings - Fork 864
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
Improve history import performance and fix some bugs #5666
Merged
FreeTubeBot
merged 5 commits into
FreeTubeApp:development
from
absidue:history-import-improvements
Sep 16, 2024
Merged
Improve history import performance and fix some bugs #5666
FreeTubeBot
merged 5 commits into
FreeTubeApp:development
from
absidue:history-import-improvements
Sep 16, 2024
Conversation
This file contains 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
absidue
requested review from
PikachuEXE,
efb4f5ff-1298-471a-8973-3d47447115dc,
ChunkyProgrammer,
kommunarr and
MarmadileManteater
September 8, 2024 21:19
github-actions
bot
added
the
PR: waiting for review
For PRs that are complete, tested, and ready for review
label
Sep 8, 2024
efb4f5ff-1298-471a-8973-3d47447115dc
approved these changes
Sep 15, 2024
PikachuEXE
approved these changes
Sep 16, 2024
ChunkyProgrammer
approved these changes
Sep 16, 2024
github-actions
bot
removed
the
PR: waiting for review
For PRs that are complete, tested, and ready for review
label
Sep 16, 2024
PikachuEXE
added a commit
to PikachuEXE/FreeTube
that referenced
this pull request
Sep 16, 2024
* development: (29 commits) Translated using Weblate (Flemish (West)) Added translation using Weblate (Flemish (West)) Translated using Weblate (Slovak) Improve history import performance and fix some bugs (FreeTubeApp#5666) Bump electron from 32.0.2 to 32.1.0 (FreeTubeApp#5710) Local API: Use IOS HLS manifest for livestreams (FreeTubeApp#5705) Translated using Weblate (Slovak) Translated using Weblate (Japanese) Bump the stylelint group with 2 updates (FreeTubeApp#5706) Bump swiper from 11.1.12 to 11.1.14 (FreeTubeApp#5709) Fix a few memory leaks while tearing down the player (FreeTubeApp#5698) Fix audio track selection (FreeTubeApp#5697) Bump shaka-player from 4.10.12 to 4.11.1 (FreeTubeApp#5677) Translated using Weblate (Czech) Translated using Weblate (Serbian) Translated using Weblate (Polish) Translated using Weblate (German) Translated using Weblate (Chinese (Simplified Han script)) Bump express from 4.19.2 to 4.20.0 (FreeTubeApp#5687) Translated using Weblate (Turkish) ...
PikachuEXE
added a commit
to PikachuEXE/FreeTube
that referenced
this pull request
Sep 16, 2024
* development: (74 commits) Translated using Weblate (Flemish (West)) Added translation using Weblate (Flemish (West)) Translated using Weblate (Slovak) Improve history import performance and fix some bugs (FreeTubeApp#5666) Bump electron from 32.0.2 to 32.1.0 (FreeTubeApp#5710) Local API: Use IOS HLS manifest for livestreams (FreeTubeApp#5705) Translated using Weblate (Slovak) Translated using Weblate (Japanese) Bump the stylelint group with 2 updates (FreeTubeApp#5706) Bump swiper from 11.1.12 to 11.1.14 (FreeTubeApp#5709) Fix a few memory leaks while tearing down the player (FreeTubeApp#5698) Fix audio track selection (FreeTubeApp#5697) Bump shaka-player from 4.10.12 to 4.11.1 (FreeTubeApp#5677) Translated using Weblate (Czech) Translated using Weblate (Serbian) Translated using Weblate (Polish) Translated using Weblate (German) Translated using Weblate (Chinese (Simplified Han script)) Bump express from 4.19.2 to 4.20.0 (FreeTubeApp#5687) Translated using Weblate (Turkish) ...
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.
Improve history import performance and fix some bugs
Pull Request Type
Related issue
closes #5174
Description
The current history import has a few flaws, which this pull request aims to iron out:
This pull request implements dedicated logic for the history import which merges together the existing history and the imported history with the help of a
Map
, then overwrites thehistoryCacheSorted
andhistoryCacheById
properties in the store and runs delete all and insert all on the database (remember we've already merged together the histories), which is a lot faster than an insert or update for every single history entry.Testing
Back up your history first
Test cases:
Desktop