Skip to content
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

Fix application lagging with many main page tabs #10671

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Dec 20, 2023

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

A lot of time ago a 1700-changes commit decided that all main page tabs would be fetched at once and stay in memory. Before customizable tabs were a feature, this made sense, but now users can add as many tabs as they want. Therefore if a user had a lot of tabs, they would all be in memory at once, making the application lag, as observed in #10471 (comment). This PR fixes the problem by just removing the line that tells the view pager to keep all tabs loaded at the same time, and instead rely on the default behaviour of only keeping in memory the current tab and the adjacent ones.

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

Disable loading all tabs at once, since there can be many of them, and use default strategy of only keeping in memory the two tabs adjacent to the current tab.
@Stypox Stypox mentioned this pull request Dec 20, 2023
21 tasks
Copy link

sonarcloud bot commented Dec 20, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AudricV AudricV added bug Issue is related to a bug channel Anything to do with creator channels in the app GUI Issue is related to the graphical user interface size/small PRs with less than 50 changed lines labels Dec 21, 2023
@Stypox Stypox merged commit b3c82f5 into TeamNewPipe:release-0.26.0 Dec 21, 2023
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug channel Anything to do with creator channels in the app GUI Issue is related to the graphical user interface size/small PRs with less than 50 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants