Performance logger does not automatically clean up timespan object properties, resulting in stoppage of XHR requests
オープン
まだ誰も着手していません。
🌐Networking
Issue: Author Provided Repro
Needs: Triage :mag:
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
As previously reported here - https://github.com/facebook/react-native/issues/30288
- XMLHttpRequest calls
startTimepanusing a key generated from the request URL. - The GlobalPerformanceLogger created by
createPerformanceLoggeradds new timespans using the key, but they are never removed - Hermes limits objects to 196,607 properties
Once the limit has been reached, no new XHR's can be made. Each will throw Property storage exceeds 196607 properties
React Native Version
0.72.6
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.5.2
CPU: (10) arm64 Apple M1 Pro
Memory: 205.81 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 16.16.0
path: /usr/local/bin/node
Yarn:
version: 1.22.15
path: /usr/local/bin/yarn
npm:
version: 8.11.0
path: /usr/local/bin/npm
Watchman:
version: 2023.09.04.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.11.3
path: /Users/mvestal/.rvm/gems/ruby-3.0.0/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.16
path: /usr/bin/javac
Ruby:
version: 3.0.0
path: /Users/mvestal/.rvm/rubies/ruby-3.0.0/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: 0.72.6
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
Make 196608 XMLHttpRequests with unique URLs.
Snack, screenshot, or link to a repository
https://snack.expo.dev/R1hc74OsN
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
XMLHttpRequest.js の568-569行目にある startTimepan 呼び出しと、createPerformanceLogger.js の291-294行目にある timespan の作成を確認してください。一意のURLを使用して196608件の XMLHttpRequests で問題を再現し、その後、Hermes property-limit error によって新しい XHR リクエストが失敗するまで timespan のプロパティが蓄積しなくなっていることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react-native
- 領域
- mobile-dev, networking, performance
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100