Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #8060: Increase performance of closing tabs #8061

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

Brandon-T
Copy link
Collaborator

Summary of Changes

  • Preserve screenshots only for the selected tab when a tab is selected.
  • Preserve screenshots only for the current tab when its history has changed.
  • Fixed strong retain cycle between a child tab and its parent.
  • Screenshot helper was made weak because there's no point of setting screenshots on a deallocated tab.

This pull request fixes #8060

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()
  • New or updated UI has been tested across:
    • Light & dark mode
    • Different size classes (iPhone, landscape, iPad)
    • Different dynamic type sizes

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue and pull request is assigned to a milestone (should happen at merge time).

… should have ever been screenshotting every single tab when one tab was selected. This reduced performance due to N - 1 screenshots being saved for every tab.

Fixed strong retain cycle between a child tab and its parent. There is no reason a child tab needs to hold onto a parent tab that was removed/closed.
Screenshot helper was made weak because there's no point of setting screenshots on a deallocated tab.
@Brandon-T Brandon-T added this to the 1.58 milestone Sep 13, 2023
@Brandon-T Brandon-T requested a review from a team as a code owner September 13, 2023 22:00
@soner-yuksel soner-yuksel merged commit 9ea2941 into development Sep 14, 2023
@soner-yuksel soner-yuksel deleted the bugfix/TabPerformance branch September 14, 2023 14:20
@iccub iccub modified the milestones: 1.58, 1.57.1, 1.57.2 Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Window.open performance issue when closing all tabs
4 participants