Code Monkey home page Code Monkey logo

Comments (7)

CJianYu avatar CJianYu commented on June 20, 2024

请问移动端h5是怎么做性能监控的呢?类似H5项目在安卓端没有问题,在ios用久了会卡顿这种问题如何解决?

from 2018.10.

zhulin2609 avatar zhulin2609 commented on June 20, 2024

请问移动端h5是怎么做性能监控的呢?类似H5项目在安卓端没有问题,在ios永久了会卡顿这种问题如何解决?

这种需求客户端配合,上报手机内存和CPU的使用情况,更细致的上报应该区分app本身占用的cpu和内存资源。

如果纯用H5,这里提供了一条思路:https://qianduan.group/posts/5b41dbb29fd64d5a7458a904

from 2018.10.

791045873 avatar 791045873 commented on June 20, 2024

老师的课程中最后讲了面向切面编程的一个例子。
例子中在组件的componentDidMount生命周期里调用了report(this),然后在report中去重写了该组件的componentDidMount方法。我的疑惑在于,都已经进入到componentDidMount生命周期内了,再去重写该生命周期的钩子方法,有什么用呢?

from 2018.10.

miniflycn avatar miniflycn commented on June 20, 2024

@791045873 AOP应该不是这个意思吧,AOP是可在另一个切面对所有Object对其标准切面做一定操作

from 2018.10.

zhulin2609 avatar zhulin2609 commented on June 20, 2024

老师的课程中最后讲了面向切面编程的一个例子。
例子中在组件的componentDidMount生命周期里调用了report(this),然后在report中去重写了该组件的componentDidMount方法。我的疑惑在于,都已经进入到componentDidMount生命周期内了,再去重写该生命周期的钩子方法,有什么用呢?

恩 例子有点问题,如果要切componentDidMount方法,需要在组件的构造函数里执行Report.init()。

from 2018.10.

zhulin2609 avatar zhulin2609 commented on June 20, 2024

请问移动端h5是怎么做性能监控的呢?类似H5项目在安卓端没有问题,在ios永久了会卡顿这种问题如何解决?

  1. 首屏渲染耗时:从客户端初始化webview时间开始算起。因为移动端先是初始化webview->loadUrl("${your_url}")
  2. polyfill.io
  3. ios只会给每个webview分配10M左右的内存来处理GPU的渲染

from 2018.10.

791045873 avatar 791045873 commented on June 20, 2024

请教老师一个问题,在业务中各个服务提供的接口都没有一个具体的规范。有可能某些服务的接口返回500或者400对于该业务来讲,都是正常的状况。在这种情况下应该怎么在全局对接口的失败或者成功做上报呢?

from 2018.10.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.