Skip to content

Memory Leak and Performance Issues with freezeOnBlur in Bottom Tab Navigation #2971

@enestatli

Description

@enestatli

Description

When using freezeOnBlur: true (or enableFreeze(true)) with React Navigation's bottom tab navigator, significant memory leaks occur along with severe JavaScript thread performance degradation. JS FPS drops from 60 to 20-40 FPS when navigating between tabs.

Expected Behavior

  • Memory should remain stable when switching between frozen tabs
  • JS FPS should maintain 60 FPS or close to it
  • No memory leaks should occur

Actual Behavior

  • Memory continuously increases with each tab switch
  • JS FPS drops to 20-40 FPS and stays low
  • Performance degrades over time

Additional Information

  • Issue appears to be related to the number of tabs: Memory leak and performance issues occur when there are more than 3 tabs. Testing with 3 or fewer tabs did not reproduce the issue (needs further confirmation)

Steps to reproduce

  1. Create a bottom tab navigator with freezeOnBlur: true
  2. Navigate between tabs multiple times
  3. Monitor memory usage and JS thread performance
  4. Observe memory increasing and FPS dropping significantly

Snack or a link to a repository

https://snack.expo.dev/@enestatli65/memory-leak-bottom-tabs

Screens version

4.11.1

React Native version

0.79.2

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo bare workflow

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: iOSThis issue is specific to iOSRepro providedA reproduction with a snack or repo is provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions