react / react/react-native

BUNDLE and MAP process for index.js is taking a long time

Đang mở
#58,557 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

📦Bundler Debugging Needs: Author Feedback Needs: Repro
Ngôn ngữ chính
C++
Star
127k
Fork
25.3k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
4

Mô tả

Description

I recently upgraded my application's React Native version from 0.80.2 to 0.86.0 (the latest stable release). However, since then, the bundle and map process for the application's index.js file has become extremely slow; the app always stays on a blank screen with no UI response for over 100 seconds while the thread is running. I’ve tried various workarounds—such as initializing libraries asynchronously and using requestNextFrame to prioritize the UI rendering before any heavy processing takes place—but nothing has worked so far. Does anyone have any ideas or suggestions as to what exactly might be causing this?

I’ve shared a performance trace generated by React Native DevTools below; the screen was blank throughout the entire trace:

Trace-20260916T122443.json

Steps to reproduce
  1. Execute yarn android
  2. Execute yarn start in another terminal
  3. Open app
React Native Version

0.86.0

Output of npx @react-native-community/cli info
System:
  OS: Linux 7.0 Ubuntu 24.04.5 LTS 24.04.5 LTS (Noble Numbat)
  CPU: (12) x64 AMD Ryzen 5 5600G with Radeon Graphics
  Memory: 2.78 GB / 14.99 GB
  Shell:
    version: "5.9"
    path: /usr/bin/zsh
Binaries:
  Node:
    version: 26.2.0
    path: /home/sandrords/.nvm/versions/node/v26.2.0/bin/node
  Yarn:
    version: 1.22.22
    path: /home/sandrords/.nvm/versions/node/v26.2.0/bin/yarn
  npm:
    version: 11.13.0
    path: /home/sandrords/.nvm/versions/node/v26.2.0/bin/npm
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "33"
      - "34"
      - "35"
      - "36"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 34.0.0
      - 35.0.0
      - 36.0.0
    Android NDK: Not Found
IDEs:
  Android Studio: Not Found
Languages:
  Java:
    version: 17.0.20
    path: /usr/bin/javac
  Ruby:
    version: 3.2.2
    path: /home/sandrords/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.2.0
    wanted: ^20.1.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.86.2
    wanted: ^0.86.0
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: false
Screenshots and Videos

No response

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện độ trễ với yarn androidyarn start, sau đó kiểm tra trace React Native DevTools đính kèm để tìm công việc đang chặn màn hình trống trong khi index.js được đóng gói và ánh xạ. So sánh hành vi trên các phiên bản React Native đã báo cáo và ghi lại nguyên nhân có thể tái hiện hoặc bước tiếp theo có thể thực hiện; hiện issue không nêu tệp dự án hay test nào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, react-native
Lĩnh vực
mobile-dev, performance
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.