Fix application lagging with many main page tabs #10671
Merged
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.
What is it?
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