Skip to content

Conversation

@absidue
Copy link
Member

@absidue absidue commented Aug 9, 2025

Pull Request Type

  • Performance improvement

Description

YouTube.js' ObservableArray#get is a wrapper around Array#find but with object comparisions, so using Array#find directly is faster.

Testing

Check that chapters still appear in the chapters box on a video with chapters such as https://youtu.be/jNQXAC9IVRw.

Desktop

  • OS: Windows
  • OS Version: 10

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 9, 2025 16:20
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 9, 2025
TheLoneRenegade
TheLoneRenegade approved these changes Aug 10, 2025
@FreeTubeBot FreeTubeBot merged commit 8358de2 into FreeTubeApp:development Aug 10, 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 Aug 10, 2025
@absidue absidue deleted the chapters-array-find branch August 11, 2025 03:09
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 11, 2025
* development:
  Translated using Weblate (Serbian)
  Fix selecting a new quick bookmark playlist (FreeTubeApp#7803)
  Migrate DistractionSettings to the composition API (FreeTubeApp#7807)
  Use Array#find directly when parsing the chapters (FreeTubeApp#7808)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Croatian)
  change iina name to IINA (FreeTubeApp#7773)
  Remove `Export Playlists For Older FreeTube Versions` (FreeTubeApp#7195)
  Enhancement: Add fast forward and rewind pop up to video player (FreeTubeApp#7729)
  Fix "more" button from sidenav not closing (FreeTubeApp#7725)
  Fix handleSyncSubscriptionCache using the SYNC_PLAYLISTS IPC channel (FreeTubeApp#7756)
  Change Close button color to white (FreeTubeApp#7752)
  Migrate PlayerSettings to the composition API (FreeTubeApp#7766)
  Bump package version from 0.23.5 to 0.23.6 (FreeTubeApp#7794)
  Add shorts player parameters to help with 403s (FreeTubeApp#7763)
  Translated using Weblate (Norwegian Bokmål)
  Bump the stylelint group with 2 updates (FreeTubeApp#7779)
  Bump tmp from 0.2.1 to 0.2.4 (FreeTubeApp#7790)
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.

6 participants