Skip to content

[iOS] Persist session restoration updates off main #29357

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

kylehickinson
Copy link
Collaborator

@kylehickinson kylehickinson commented Jun 2, 2025

This ensures CoreData updates for tabs that are saved when the app is backgrounded happen off the main thread which can cause some hangs with large tab sets and quick multitasking

Most tabs are updated during navigations anyways

Resolves brave/brave-browser#46551

Test Case

  • Verify tab restoration works correctly when forcefully killing the app via app switcher
  • Verify tab restoration works on sites like YouTube which push history onto the page instead of load new navigations

This ensures CoreData updates for tabs that are saved when the app is backgrounded happen off the main thread which can cause some hangs with large tab sets and quick multitasking
@kylehickinson kylehickinson self-assigned this Jun 2, 2025
@kylehickinson kylehickinson requested a review from a team as a code owner June 2, 2025 21:05
@kylehickinson kylehickinson added CI/skip-android Do not run CI builds for Android CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-windows-x64 Do not run CI builds for Windows x64 CI/skip-macos-arm64 Do not run CI builds for macOS arm64 CI/skip-teamcity Do not run builds in TeamCity labels Jun 2, 2025
@kylehickinson kylehickinson merged commit 7ed1323 into master Jun 3, 2025
19 checks passed
@kylehickinson kylehickinson deleted the ios-async-session-save branch June 3, 2025 16:13
@github-actions github-actions bot added this to the 1.81.x - Nightly milestone Jun 3, 2025
@brave-builds
Copy link
Collaborator

Released in v1.81.44

@kylehickinson
Copy link
Collaborator Author

If uplifted also uplift #29380

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-android Do not run CI builds for Android CI/skip-macos-arm64 Do not run CI builds for macOS arm64 CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-teamcity Do not run builds in TeamCity CI/skip-windows-x64 Do not run CI builds for Windows x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Perf, iOS] Tabs data saved when the app is backgrounded can hang the app
3 participants