react / react/react-native

Performance logger does not automatically clean up timespan object properties, resulting in stoppage of XHR requests

未关闭
#41,180 1 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

🌐Networking Issue: Author Provided Repro Needs: Triage :mag:
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

As previously reported here - https://github.com/facebook/react-native/issues/30288

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

Screenshot 2023-10-24 at 4 00 07 PM

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

阅读 XMLHttpRequest.js 第568-569行的 startTimepan 调用,以及 createPerformanceLogger.js 第291-294行的 timespan 创建。使用唯一的 URL 通过 196608 个 XMLHttpRequests 重现该问题,然后验证 timespan 属性不再累积,直到新的 XHR 请求因 Hermes property-limit error 而失败。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, react-native
领域
mobile-dev, networking, performance
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。