当前位置:网站首页>性能优化----严苛模式
性能优化----严苛模式
2022-07-02 22:07:00 【咋就那么爱学习】
StrictMode是一个开发工具,它可以检测出我们可能无意中做的事情,并将它们提醒我们注意,以便我们能够修复它们。
StrictMode最常用于捕获应用程序主线程上的意外磁盘或网络访问。帮助我们让磁盘和网络操作远离主线程,可以使应用程序更加平滑、响应更快。
举例:比如开启了严苛模式,在主线程去做IO的耗时操作时:
如果加了penaltyLog违规日志打印,就会把错误主线程进行了IO 操作给打印出来。
如果加了penaltyDeath 违规崩溃,就会把崩溃的信息打印出来。
这样都是用来提醒开发人员,代码违规不合理,需要去修复。
边栏推荐
- Service visibility and observability
- 附加:【登录信息存储】与【登录状态校验】;(包括:总结了到目前为止,有关【登录信息存储】与【登录状态校验】的所有内容;)
- I admire that someone explained such an obscure subject as advanced mathematics so easily
- 原生js添加样式的方法
- 【AUTOSAR-DCM】-4.3-UDS $22和$2E服务如何读取和写入NVM数据
- Unity发布WebGL播放声音的一种方法
- Basic concepts of image and deep understanding of yuv/rgb
- PHP wechat red packet grabbing algorithm
- Struct, bit segment, enumeration, union
- Additional: [login information storage] and [login status verification]; (including: summarizing all the contents of [login information storage] and [login status verification] so far;)
猜你喜欢
[error record] the flutter reports an error (could not read script 'xxx\flutter\u tools\gradle\app\u plugin\u loader.gradle')
任务和特权级保护
Objects and object variables
Reading experience of just because
Tencent three sides: in the process of writing files, the process crashes, and will the file data be lost?
#include errors detected. Please update your includePath.
phpcms实现订单直接支付宝支付功能
Simpleitk use - 3 Common operations
Build your own website (22)
[shutter] shutter application life cycle (foreground state resumed | background state paused | inactive | component separation state detached)
随机推荐
JS获取display为none的隐藏元素的宽度和高度的解决方案
Pointer - function pointer
[shutter] shutter application theme (themedata | dynamic modification theme)
Meibeer company is called "Manhattan Project", and its product name is related to the atomic bomb, which has caused dissatisfaction among Japanese netizens
Simpleitk use - 3 Common operations
Notes on key vocabulary of the original English book biography of jobs (IX) [chapter seven]
NC24325 [USACO 2012 Mar S]Flowerpot
It's not easy to say I love you | use the minimum web API to upload files (swagger support) # yyds dry inventory #
An overview of the development of affective computing and understanding research
牛客网:龙与地下城游戏
杰理之快速触摸不响应问题【篇】
Mathematical modeling -- graph and network models and methods (I)
建立自己的网站(22)
Market Research - current situation and future development trend of cell-based seafood market
Scrcpy this software solves the problem of sharing mobile screen with colleagues | community essay solicitation
ArrayList analysis 2: pits in ITR, listiterator, and sublist
Market Research - current market situation and future development trend of handheld wound imaging equipment
Jerry's modification does not require long press the boot function [chapter]
php实现根据输入的年龄查询出生日期符合的数据
《乔布斯传》英文原著重点词汇笔记(十一)【 chapter nine】