Repository navigation
Speed up the loading of the geolocation data - #7527
Merged
Merged
Conversation
absidue
requested review from
a user,
MarmadileManteater,
PikachuEXE,
efb4f5ff-1298-471a-8973-3d47447115dc and
kommunarr
June 7, 2025 13:28
FreeTubeBot
enabled auto-merge (squash)
June 7, 2025 13:28
efb4f5ff-1298-471a-8973-3d47447115dc
approved these changes
Jun 7, 2025
kommunarr
approved these changes
Jun 7, 2025
PikachuEXE
approved these changes
Jun 8, 2025
PikachuEXE
added a commit
to PikachuEXE/FreeTube
that referenced
this pull request
Jun 10, 2025
…urrent * fix/electron-video-playback-error: (25 commits) Bump electron-builder from 26.0.15 to 26.0.16 (FreeTubeApp#7539) Bump eslint-plugin-vue from 10.1.0 to 10.2.0 in the eslint group (FreeTubeApp#7537) Bump webpack-dev-server from 5.2.1 to 5.2.2 (FreeTubeApp#7538) Bump electron from 36.3.2 to 36.4.0 (FreeTubeApp#7540) Translated using Weblate (Hungarian) Migrate FtPlaylistAddVideoPrompt and FtPlaylistSelector to the composition API (FreeTubeApp#7511) Speed up the loading of the geolocation data (FreeTubeApp#7527) Remove unnecessary barrel file in store (FreeTubeApp#7522) Translated using Weblate (Bulgarian) add rules to issue templates (FreeTubeApp#7516) Translated using Weblate (Romanian) Translated using Weblate (Serbian) Translated using Weblate (Russian) Move settings to `more` menu on smaller mobile devices (FreeTubeApp#7506) Translated using Weblate (Russian) Migrate WatchVideoLiveChat to the composition API (FreeTubeApp#7494) Translated using Weblate (Basque) Translated using Weblate (Russian) Bump shaka-player from 4.14.14 to 4.14.15 (FreeTubeApp#7501) Bump electron from 36.3.1 to 36.3.2 (FreeTubeApp#7500) ...
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
Description
Currently the geolocation files have this format
{ name: string, code: string }[], but at runtime we need two separate arrays, one containing the names and the other ones the codes, which requires us to map them into those two array at runtime. Those files are generated by ourgetRegions.mjsscript, so we could generate them in a format that avoids that mapping at runtime, which is exactly what this pull request does, by changing to the format to{ names: string[], codes: string[] }.As an added benefit these changes also reduces the total size of the geolocation JSON files from 178647 bytes (~174 KB) down to 96867 bytes (~94.5 KB).
Testing
Change the "Locale Preference" in the "General" settings and check that the names in the "Region for Trending" dropdown still get updated to match the current "Locale Preference".
Desktop