百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-native-slowlog

> 前端框架
开源

一个基于高性能定时器的 React Native 分析器,可帮助您跟踪大型性能问题。

376 stars0 点赞5 次浏览
访问官网GitHub

工具介绍

一个基于高性能定时器的 React Native 分析器,可帮助您跟踪大型性能问题。

Slowlog

A high-performance timer for React Native that helps you track big performance problems. Use it as a first line of defense, before tools like system trace and perftools.

Quickstart

In your React Native project run:

$ npm i -S react-native-slowlog

This is added as a runtime dependency, and slowlog will only run in developer mode (using the __DEV__ flag).

To use slowlog apply it to your component this way:

javascript
class Master extends Component {
  constructor(props){
    super(props)
    slowlog(this, /.*/)

    this.state = this.getDataSource(props)
    this.shouldComponentUpdate = shouldComponentUpdate.bind(this)
  }
...
}

Options

You can apply slowlog differently based on your needs:

javascript
slowlog([this], [regex matching methods], { verbose: false, threshold: 16, log: console, excludes: [dict of excluded methods] })
  • verbose - will output all timing information to console, and just slow operations to yellowbox
  • threshold - in milliseconds. Anything above that goes to yellowbox
  • log - a console-like object. Anything that responds to .log([msg]) and .warn([msg])
  • excludes - a dict containing an exclusion list, like so {foobar:true, constructor:true} and so on. If you change this, remember to always include constructor

Contributing

Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).

Copyright

Copyright (c) 2016 Dotan Nahum @jondot. See LICENSE for further details.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptdebugginginfrastructureperformancereact-native

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架