Skip to content

Slow bundling and poor debugging performace with react-native-worklets 0.8.1 in React Native 0.85 #9315

@EmilJunker

Description

@EmilJunker

Description

When building an app with React Native 0.85 and react-native-worklets 0.8.1, the bundling and debugging performance with Metro is very slow. This was not the case in React Native 0.84 with react-native-worklets 0.7.4.

Steps to reproduce

  1. Clone https://github.com/EmilJunker/rn-worklets-bug
    (it's a blank new RN 0.85.2 project where I added "react-native-worklets": "^0.8.1" as a dependency)
  2. Run npm install and then npm run android
  3. After the build is done, observe that Metro takes very long to bundle
  4. After bundling is done, make a change to the App.tsx file and observe that Fast Refresh is very slow
  5. Press J on the keyboard to open the developer tools and observe that they take very long to open

  1. Run npm uninstall react-native-worklets and remove the plugin reference from babel.config.js
  2. Then repeat the same steps 2 through 5 again and observe that everything is much faster

Snack or a link to a repository

https://github.com/EmilJunker/rn-worklets-bug

Reanimated version

none

Worklets version

0.8.1

React Native version

0.85.2

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native CLI

Architecture

New Architecture (Fabric renderer)

Reanimated feature flags

No

React Native release level

Stable

Build type

Debug app & dev bundle

Device

Real device

Host machine

Windows

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: AndroidThis issue is specific to AndroidRepro providedA reproduction with a snippet of code, 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