首页 文章 精选 留言 我的

精选列表

搜索[系统工具],共10000篇文章
优秀的个人博客,低调大师

Facebook iOS UI 工具ComponentKit简介

在 iOS 上面开发界面,需要创建视图、配置界面、视图分层等等很多步骤,也就不可避免的需要书写 N 多的代码。这还仅仅是界面设计,除此之外,完成 controllers 的回调、控制内部事务在界面上的显示效果、界面的操控和内部事务的联系等等多方面的事情都需要手动解决。即便是界面很简单的 App,如果存在这种复杂的双向数据流的关系,那么代码也会变得很复杂很容易出错。Qt 的信号、槽和 iOS 的 Target-Action 机制其实也是很容易实现这种双向数据流的关系,但是没有办法解决界面和事务之间的联系,也有很多其他的问题:性能、测试等。 这些问题曾经困扰了我们多年。News Feed 是有着复杂的列表样式外观的 iOS 软件,由许多的 Row Type 组成,每一个 Row 都有各种各样不同的很烦的界面样式和交互方式,这个就很坑了。每次维护这个东西都像是在清理厕所,尤其是它的功能还在不断增加,它的代码在不断变多,版本迭代速度快到你都没办法直到每天都到底增添了什么新代码,上司还要拿着报告说“你这个软件太慢了,影响用户体验,给你三个小时把这个 App 的速度提高 80%”。 为了解决这一挑战性的问题,我们从自己的 ReactJS 得到启发,把很多具体的东西抽象出来,做出一个功能性的、响应式编程模型的 iOS 原生 UI 框架 ComponentKit,目前 News Feed 在应用这个框架。 ComponentKit 简介 ComponentKit 使用功能性和声明性(declarative)的方法来进行创建界面,和以往不同的是,ComponentKit 使用单向数据流的形式从 不可变的模型 映射到不可变的组件来确定视图的显示方式。ComponentKit 的 declarative 看上去和 declarative UI(QML) 差不多,其实差得远。QML 更偏向于 UI 设计的描述性,而 ComponentKit 则是做好基本 UI 和事件之间的联系,让事件设计和 UI 设计可以分开单独完成。 内在决定外在,组件的功能和内部的层次决定了用户界面该如何规划,界面的规划决定了 UI Kit 的元素层次结构的设计。 传统做法的结果是大部分时间都被浪费在 UI 该如何实现,ComponentKit 却可以让你把时间都用在在 UI 该怎么设计上面。 例如,传统的 iOS 开发中,为了开发一个带有 header、text 和 footer 的视图,需要以下步骤: 分别创建 header 视图、text 视、footer 视图的实例 将三个视图添加为 container 的子视图 添加约束条件,让每个视图和 container 的宽度相同 添加更多的约束条件,确保每个视图的摆放位置 但是 ComponentKit 不一样,ComponentKit 是一种描述性的开发包:你只需要提供你希望得到什么便能得到什么,而不和传统的 iOS 开发一样,再去一个一个地创建视图、修改视图样式、添加视图、添加约束条件。如图所示,想要得到这个布局,只需要使用描述性的语言描述“我想要一个 header 组件,一个 text 组件,一个 footer 组件,他们的宽度相同,从上到下排列在一起”。单单从这点来看,和 QML 相比,ComponentKit 更类似于 Bootstrap:提供已经完成的组件,你只需要决定组件如何摆放,便可轻松地开发出 UI 界面。 ComponentKit 已经完全把如何渲染 UI 的事情抽象出来,程序员完全可以不去考虑具体是如何实现渲染的,也不用去考虑界面渲染该如何优化。ComponentKit 使用后台线程进行界面布局,也实现了智能组件重用,你完全可以不去考虑界面导致的内存泄露问题。ComponentKit 不仅仅可以极大地提高开发效率,界面响应速度和软件的运行效率也会有极大地提升。 News Feed 移植到 ComponentKit ComponentKit 极大地提升了 News Feed 的 UI 响应速度和稳定性,也让整个软件的内部编码更容易理解。ComponentKit 达到了如下的目标: 减少了 70% 的界面渲染代码,麻麻再也不用担心我每次去维护之前都要看那本又臭又长的手册然后花一上午的时间去理解那个错综复杂的布局了。 显著地提高了滑屏的性能。ComponentKit 消除了许多的 container视图,尽力将所有的视图结构化简。更简洁的视图结构意味着界面的渲染性能和执行效率更高。 提高测试覆盖率。ComponentKit 对于 UI 模块化的设计保证了每一部分都可以被分离开来单独进行测试。再加上 snapshot tests,我们现在几乎已经可以对 News Feed 的所有部分都进行测试了。 引入了 ComponentKit 之后,我们能够维护更少的代码,有更少的 bug 需要修复,有更大的测试覆盖率:我们现在可以有更多的时间做羞羞的事情了 ComponentKit 已经在生产环境的 News Feed 上用了六个月,我们觉得可以一直用下去。现在将 ComponentKit 开源,让整个 iOS 开发者社区的人都有 Facebook 的生产效率,也都能和 Facebook 一样做出高性能的 App。很希望你也能在你的开发环境中使用 ComponentKit,然后给我们反馈。 我们重新定义了如何在 iOS 上开发界面,希望你也能用 ComponentKit 开发出更优雅的 App。 快速入门 ComponentKit 已经在 CocoaPods 中可用了,只需要在 Podfile 添加如下代码即可: pod 'ComponentKit', '~> 0.9' pod try ComponentKit 原文:Introducing ComponentKit: Functional and declarative UI on iOS

优秀的个人博客,低调大师

编写脚本实用工具

1、查看哪个文件占用最大 查看前十名磁盘空间用户,到第11行,sed会删除列表的剩余部分,然后给列表中每行一个行号。要让行号和磁盘空间文本 位于同一行,用N命令将文本行合并在一行。然后用gawk命令清理,在行号后,加一个冒号(:),还给每行文本的输出行中的每个字段放了一个制表符。这样就生成了一个格式精致的前十名 磁盘空间用户列表了 1 2 3 4 5 6 7 8 9 10 11 [root@digitcube-test1qingyun]#du-Sh/home/*|sort-rn|sed '{11,$D;=}' |sed 'N;s/\n//' |gawk '{print$1":""\t"$2"\t"$3"\n"}' 1 :1020K/home/nexus/sonatype-work/nexus/storage/central/org/springframework/spring-context/ 2.5 . 6 2 :1020K/home/nexus/sonatype-work/nexus/storage/central/ant/ant/ 1.6 . 5 3 :1012K/home/nexus/sonatype-work/nexus/storage/central/org/springframework/spring-beans/ 2.5 . 6 4 :1012K/home/maven/.m2/repository/org/xerial/snappy/snappy-java/ 1.0 . 4.1 5 :1008K/home/home/hadoop/jstorm/dc_topology/tmp/org/apache/hadoop/hdfs/server/namenode 6 :1008K/home/home/hadoop/hadoop- 1.0 . 4 /docs/api/org/apache/hadoop/mapreduce 7 :1008K/home/hadoop/sam/datatask/doubixiyou_1290 8 :1008K/home/hadoop/hadoop- 1.0 . 4 /docs/api/org/apache/hadoop/mapreduce 9 :1004K/home/home/hadoop/jstorm/dc_topology/tmp/kafka/log 10 :1000K/home/maven/.m2/repository/org/xerial/snappy/snappy-java/ 1.0 . 3.2 2、创造加了日期的前十名磁盘空间用户报告的脚本 1 <br> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 [root@digitcube-test1tmp] #vimfile_siz.sh #!/bin/bash #Big_User-findbigdiskspaceusersinvariousdirecotries #ParametersforScript # CHECK_DIRECTORIES= "/var/log/home" #direcotriestocheck # ######################MainScript########################### # DATE=` date +%m%d%y` #Dateforreportfile exec >space_file_$DATA.rpt # # echo "TopTenDiskSpaceUsage" #Reportheaderforwholereport echo "for$CHECK_DIRECTORIESDirecotries" # for DIR_CHECK in $CHECK_DIRECTORIES #looptodudirectories do echo "" echo "The$DID_CHECKDirectory:" #Titleheaderforeachdirecotry # #Createalistingoftoptendiskspaceusers du -S$DIR_CHECK2> /dev/null | sort -rn| sed '{11,$D;=}' | sed 'N;s/\n//' | gawk '{printf$1":""\t"$2"\t"$3"\n"}' # done exec > /tmp/test .txt 2、创建按日期归档的脚本 归档文件,让脚本读取file_to_backup里面每个目录或文件,用到一个简单read命令,来读取该文件中的每一条记录。 exec<$CONFIG_FILE read FILE_NAME 为归档配置文件以及从file_to_backup读取每条记录都用了变量.只要read命令在配置文件中发现还有记录要读,它就会在?变量中返回一退出状态码0表示成功,以while循环的测试条件来读取file_to_backup的所有记录 while [ $? -eq 0 ] do .... read FILE_NAME done 一旦read命令到了末尾,返回一个非0状态码,脚本会退出while循环 1 2 3 4 5 [root@digitcube-test1tmp]#cat/home/qingyun/file_to_backup /home/qingyun/test1 /home/qingyun/test2 /home/qingyun/test3 /home/qingyun/love 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 [root@digitcube-test1tmp]#vimDaily_Archive.sh # #SetConfigurationandDestinationFile # CONFIG_FILE=/home/qingyun/file_to_backup DESTINATION=/home/qingyun/$FILE # ##############MainScript###################### # #CheckBackupConfigfileexists # if [-f$CONFIG_FILE]#Makesuretheconfigfilestillexits then echo else echo echo "$CONFIG_FILEdoesnotexist" echo "BackupnotcompletedduetomisstingConfigurationfile" echo exit fi # #Buildthenameofallthefilestobackup # FILE_NO= 1 #Startonline 1 ofConfigFile exec<$CONFIG_FILE#RedirectStdInputtonameofConfigFile # readFILE_NAME#Read1strecord # while [$?-eq 0 ]#Createlistoffilestobackup do #Makesurethefileordirectoryexists if [-f$FILE_NAME] then #Iffileexists.additsnametothelist echo$FILE_NAME FILE_LIST= "$FILE_LIST$FILE_NAME" else #Iffiledoesn'texist.issuewarning echo echo "$FILE_NAME,doesnotexist" echo "Obviously,Iwillnotincludeiinthisarchive" echo "Itislistedonline$FILE_NOoftheconfigfile." echo "Continuingtobuildarchivelist...." echo fi # FILE_NO=$[$FILE_NO+ 1 ]#IncreaseLine/Filenumberbyon readFILE_NAME#Readnextrecord done ############################################################ # #BackupthefilesandCompressArchive # tar-czf$DESTINATION$FILE_LIST 2 >/dev/ null 按小时归档的脚本 归档目录包含了跟一年中的各个月份对应的目录,将月的序号作为目录名。而每月的目录中又包含跟一个月中的各天对应的目录(用天序号来作为目录)。这样只用给每个归档文件加时间戳然后将它他们放到跟日和月份对应的目录就行了。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 [root@digitcube-test1tmp]#vimHourly_Archive.sh #!/bin/bash # #Hourly_Archive-Everyhourcreateanarhive ############################################## # #SetConfigureationFile # CONFIG_FILE=/home/qingyun/hourly/file_to_backup # #SetBaseArchiveDestinationLocation # BASEDEST=/home/qingyun/hourly # #GatherCurrentDay.Month&Time # DAY=`date+%d` MONTH=`date+%m` TIME=`date+%k%M` # #CreateArchiveDestinationDirectory # mkdir-p$BASEDEST/$MONTH/$DAY DESTINATION=$BASEDEST/$MONTH/$DAY/archive.$TIME.tar.gz # #BuildArchvieDestinationfileName # ###############MAINScript##################################### #CheckBackupConfigfileexists # if [-f$CONFIG_FILE]#Makesuretheconfigfilestillexits then echo else echo echo "$CONFIG_FILEdoesnotexist" echo "BackupnotcompletedduetomisstingConfigurationfile" echo exit fi # #Buildthenameofallthefilestobackup # FILE_NO= 1 #Startonline 1 ofConfigFile exec<$CONFIG_FILE#RedirectStdInputtonameofConfigFile # readFILE_NAME#Read1strecord # while [$?-eq 0 ]#Createlistoffilestobackup do #Makesurethefileordirectoryexists if [-f$FILE_NAME] then #Iffileexists.additsnametothelist echo$FILE_NAME FILE_LIST= "$FILE_LIST$FILE_NAME" else #Iffiledoesn'texist.issuewarning echo echo "$FILE_NAME,doesnotexist" echo "Obviously,Iwillnotincludeiinthisarchive" echo "Itislistedonline$FILE_NOoftheconfigfile." echo "Continuingtobuildarchivelist...." echo fi # FILE_NO=$[$FILE_NO+ 1 ]#IncreaseLine/Filenumberbyon readFILE_NAME#Readnextrecord done ############################################################ # #BackupthefilesandCompressArchive # tar-czf$DESTINATION$FILE_LIST 2 >/dev/ null 3、管理用户账号 脚本进入删除用户4个步聚: 1、获得并确认用户账户名, 2、查找和终止用户的进程, 3、创建一份属于该用户账号的所有文件报告, 4、最终删除用户账号 用到判断参数 -z:字符长度0,为真 -n:字符长度非0,为真 unset:删除变量和函数 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 [root@logicservertmp]#vimDelte_user.sh #!/bin/bash # #Delte_User-Automatesthe 4 steptoremoveanaccount # #DefinFunctions # ########################################################## function get_answer{ unsetANSWER ASK_COUNT= 0 # while [-z "$ANSWER" ]# while noanwser is given.keeipasking do ASK_COUNT=$[$ASK_COUNT+ 1 ] # case $ASK_COUNT in #Ifusergivesnoanswer in timeallotted 2 ) echo echo "Pleaseanswerthequestion" echo ;; 3 ) echo echo "Onelasttry.....pleaseanswerthequestion." echo ;; 4 ) echo echo "Sinceyourefusetoanswerthequestion.." echo "exitingprogram." # exit ;; esac # echo # if [-n "$LINE2" ] then#print 2 lines echo$LINE1 echo-e$LINE2 "\c" else echo-e$LINE1 "\c" fi # #Allow 60 secondtoanswerbefortime-out read-t 60 ANSWER done #Doalittel var iableclean-up unsetLINE1 unsetLINE2 # }#Endofget_answer function # ##################################################################### function process_answer{ # case $ANSWER in y|Y|YES|yes|Yes|yEs|yeS|YEs|yES) #Ifuseranswer "yes" . do noting ;; *) #Ifuseransweranythingbut "yes" .exitscript echo echo$EXIT_LINE1 echo$EXIT_LINE2 echo exit ;; esac # #Doalittle var iableclean-up # unsetEXIT_LINE1 unsetEXIT_LINE2 # }#Endofprocess_answerfuntion # ################################################################### #EndofFunctionDefinitions # ######################MianScript################################# #GetnameofUserAccounttocheck # echo "Step$1-DeterminUserAccountnametoDelete" echo LINE1= "pleaseentertheusernameoftheuser" LINE2= "Accountyouwishtodeletefromsystem:" get_answer USER_ACCOUNT=$ANSWER # #Doublecheck with scriptuserthat this is thecoreectUserAccount # LINE1= "Is$USER_ACCOUNTtheuseraccount" LINE2= "Youwishtodeletefromthesystem?[y/n]" get_answer # #Callprocess_answerfuntion: #Ifuseransweranythingbut "yes" .exitscript # EXIT_LINE1= "Becausetheaccount,$USER_ACCOUNT,isnot" EXIT_LINE2= "Theoneyouwishtodelete.weareleavingthescript..." process_answer # ############################################################################ # USER_ACCOUNT_RECORD=$(cat/etc/passwd|grep-w$USER_ACCOUNT) # if [$?-eq 1 ]#Iftheaccount is notfound.exitscript then echo echo "Account,$USER_ACCOUNT.notfound" echo "Leavingthescript..." echo exit fi # echo "Ifoundthisrecord:" echo$USER_ACCOUNT_RECORD echo # LINE1= "IsthisthecorrectUserAccount?[y/n]" get_answer # # #Callprocess_answer function : #Ifuseranswersanythingbut "yes" ,exitscript # EXIT_LINE1= "Becausetheaccount,$USER_ACCOUNT,isnot" EXIT_LINE2= "Theoneyouwishtodelete.weareleavingthescript...." process_answer # ##################################################################### #Search for anyrunningprocessesthatbelongtotheUserAccount # echo echo "Step#2-Findprocessonsystembelogingtouseraccount" echo echo "$USER_ACCOUNThasthefollowingprocessrunning:" echo # ps-u$USER_ACCOUNT#Listuserprocessesrunning. case $? in 1 )#Noprocessesrunning for this UserAccount # echo "Therearenoprocessesforthisaccountcurrentlyrunning." echo ;; 0 )#Processesrunning for this UserAccount. #AskScriptUser if wantsustokilltheprocesses. # unsetANSWER LINE1= "Wouldyoulikemetokillmeprocess(es)?[y/n]" get_answer # case $ANSWER in y|Y|YES|yes|Yes|yEs|yeS|YEs|yES)#Ifuseranswers "yes" #KillUserAccountprocesses. # echo # #Clean-uptempfileuponsignals trap "rm$USER_ACCOUNT_Running_Process.rpt" SIGTERMSIGINTSIGQUIT # #Listuserprocessesrunning ps-u$USER_ACCOUNT>$USER_ACCOUNT_Running_Process.rpt # exec<$USER_ACCOUNT_Running_Process.rpt#MakereportStdInput readUSER_PROCESS_REC#Firstrecordwillbeblank readUSER_PROCESS_REC # while [$?-eq 0 ] do #obtainPID USER_PID=`echo$USER_PROCESS_REC|cut-d "" -f1` kill- 9 $USER_PID echo "Killedprocess$USER_PID" readUSER_PROCESS_REC done # echo rm$USER_ACCOUNT_Running_Process.rpt#Removetempreport. ;; *)#Ifuseransweranythingbut "yes" , do notkill echo echo "Willnotkilltheprocess(es)" echo ;; esac ;; esac ########################################################################## #CreateareportofallfilesownedbyUserAccount # echo echo "Step#3-Findfilesonsystembelongingtouseraccount" echo echo "Creatingareportofallfilesownedby$USER_ACCOUNT." echo echo "Itisrecommendedthatyoubackup/archivethesefiles." echo "andthendooneoftwothings;" echo "1)Deletethefiles" echo "2)Changethefiles'ownershiptoacurrentuseraccount." echo echo "Pleasewait.Thismaytakeawhile...." echo echo "Pleasewait.Thismaytakeawhile...." # REPORT_DATE=`date+%y%m%d` REPORT_FILE=$USER_ACCOUNT "_files_" $REPORT_DATE ".RPT" # find/-user$USER_ACCOUNT>$REPORT_FILE 2 >/dev/ null # echo echo "Reportiscommlete." echo "Nameofreport:$REPORT_FILE" echo "Locationofreport:`pwd`" echo ############################################ #RemoveUserAccount echo echo "Step#4-Removeuseraccount" echo # LINE1= "Doyouwishtoremove$USER_ACCOUNTaccountfromsystem?[y/n]" get_answer # #Callprocess_answer function : # if useransweranythinbut "yes" .exitscript # EXIT_LINE1= "Sinceyoudonotwishtoremovetheuseraccount." EXIT_LINE2= "$USER_ACCOUNTatthistime.exitingthescript..." process_answer # userdel$USER_ACCOUNT# delete useraccount echo echo "Useraccount.$USER_ACCOUNT.hasbeenremoved" echo 本文转自 zouqingyun 51CTO博客,原文链接:http://blog.51cto.com/zouqingyun/1696340,如需转载请自行联系原作者

优秀的个人博客,低调大师

Android性能分析工具的使用

一、Android Studio-Memory Monitor 使用方法 run起你的项目,找到Memory Monitor窗口,选择Memory [转]内存变化波形图 另外,还可选择查看CPU和GPU还有NetWork的使用情况。 网络使用波形图.png 其中NetWork的频繁使用是造成应用耗电的关键,70%左右的电量是被上报数据,检查位置信息,定时检索后台广告信息所使用掉的。如何平衡这两者的电量消耗,就显得非常重要了。 二、Android Studio 1.5 Preview 新玩具-Heap Snapshot 使用方法 同样run起项目,进行一些操作之后点击左下角‘Dump Java Heap’的按钮 每次点击之后会生成一个.hprof的文件 点击一个.hprof文件,查看右侧的analyzer test,能看到两个选项 一个是‘Detect Leaeked Activites’,另一个是'Find Duplicate Strings',点击右上角的绿色播放按钮,会自动分析heap dump去定位泄露的activity和重复的string,出现如下的Analysis Results。 该面板里的信息可以有三种类型:app heap/image heap/zygote heap. 分别代表app 堆内存信息,图片堆内存信息,zygote进程的堆内存信息。 各属性中英文对照表 名称 Total Count Heap Count Sizeof Shallow size Retained Size 意义 内存中该类的对象个数 堆内存中该类的对象个数 物理大小 对象本身占有内存大小 释放该对象后,节省的内存大小 名称 depth Shallow Size Dominating Size 意义 深度 对象本身内存大小 管辖的内存大小 三、Eclipse-Allocation Tracker(分配跟踪器) 使用方法 点击“Start Tracking”,在应用中执行某个操作,然后点击“Get Allocations”。 Allocation Tracker 特点 a.需要进行间断的操作 b.可定位到具体某一行代码 四、hierarchyviewer 使用hierarchyviewer查看需要检查的页面的层次,检查页面最深层数, 官方建议最好控制在10层以内 hierarchyviewer 布局层级优化方案: 1). 自定义控件使用merge标签来减少不必要的根节点; 2).使用drawbleleft,代替多添加一个imageview; 3).有时使用relativelayout会比linearlayout需要更少层次就能达到实现效果; 4).使用viewstub来隐藏控件,ViewStub中的布局只有在你需要的时候才会渲染到主界面中; ... 五、leakcanary(Android 和 Java 内存泄露检测框架) AndroidStudio https://github.com/square/leakcanary Eclipse https://github.com/SOFTPOWER1991/LeakcanarySample-Eclipse 六、手机设置->开发者选项 1. Show GPU Overdraw Show GPU Overdraw 蓝色,淡绿,淡红,深红代表了4种不同程度的Overdraw情况,我们的目标就是尽量减少红色Overdraw,看到更多的蓝色区域。 优化方案: Overdraw有时候是因为你的UI布局存在大量重叠的部分,还有的时候是因为非必须的重叠背景。例如某个Activity有一个背景,然后里面 的Layout又有自己的背景,同时子View又分别有自己的背景。仅仅是通过移除非必须的背景图片,这就能够减少大量的红色Overdraw区域,增加 蓝色区域的占比。这一措施能够显著提升程序性能。 Profile GPU Rendering - 选中On screen as bars的选项 每一条柱状线都包含三部分,蓝色代表测量绘制Display List的时间,红色代表OpenGL渲染Display List所需要的时间,黄色代表CPU等待GPU处理的时间。 中间有一根绿色的横线,代表16ms,我们需要确保每一帧花费的总时间都低于这条横线,这样才能够避免出现卡顿的问题。 本文作者:佚名 来源:51CTO

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

用户登录
用户注册