Skip to content

Conversation

@absidue
Copy link
Member

@absidue absidue commented Jan 27, 2025

Miscellaneous performance improvements

Pull Request Type

  • Performance improvements

Description

This pull request contains various performance improvements that I thought were too small to stick in separate pull requests.
The changes:

  • Merge consecutive classList.add() calls into a single one, as the .add() method allows for passing multiple classes.
  • In the keyboard shortcuts prompt, instead of creating an array of objects, where each object contains a single property that holds an array, we can simplify it to just be an array of arrays. I also got rid of an extra v-if that will always be true in that component.
  • I also cleaned up two regexes, in one case I removed the extra capture groups and in the other it was simple enough that it could be replaced by a string.
  • In the single playlists export, we had chained two String#replaceAll calls, one replaced spaces with underscores and the other replaced various other special characters with underscores, so I merged them into a single call.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: edef122

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 27, 2025
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 27, 2025 21:39
@FreeTubeBot FreeTubeBot merged commit 34b5179 into FreeTubeApp:development Jan 27, 2025
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 27, 2025
@absidue absidue deleted the misc-perf branch January 27, 2025 22:33
SudharakaP pushed a commit to SudharakaP/FreeTube that referenced this pull request Jan 28, 2025
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Jan 29, 2025
* development: (35 commits)
  Shrink mime-db even further (FreeTubeApp#6659)
  * Update play next recommended video setting to be "by default" (FreeTubeApp#6400)
  Miscellaneous performance improvements (FreeTubeApp#6658)
  Bump stylelint in the stylelint group across 1 directory (FreeTubeApp#6660)
  Bump the stylelint group across 1 directory with 4 updates (FreeTubeApp#6605)
  Fixes FreeTubeApp#5476: Adjusted z-index for tooltips to avoid overlapping with bars (FreeTubeApp#6656)
  Bump shaka-player from 4.12.8 to 4.13.0 (FreeTubeApp#6649)
  Migrate ProfileSettings, FtProfileBubble and FtProfileEdit to the composition API (FreeTubeApp#6639)
  Translated using Weblate (Arabic)
  Bump the eslint group with 4 updates (FreeTubeApp#6645)
  Bump bgutils-js from 3.1.2 to 3.1.3 (FreeTubeApp#6650)
  Translated using Weblate (Arabic)
  Translated using Weblate (Arabic)
  Bump electron from 34.0.0 to 34.0.1 (FreeTubeApp#6648)
  Bump lefthook from 1.10.9 to 1.10.10 (FreeTubeApp#6647)
  Bump the babel group with 2 updates (FreeTubeApp#6644)
  Translated using Weblate (Arabic)
  Avoid logging an error when a player cache entry does not exist (FreeTubeApp#6640)
  Move saving screenshots to the default folder to an IPC call (FreeTubeApp#6636)
  Replace rimraf dev dependency with clean script (FreeTubeApp#6638)
  ...
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.

5 participants