combing1のブログ -13ページ目

combing1のブログ

ブログの説明を入力します。

Front nagging Some recent company app list when there will Air Max 2011 Womens Purple Black Grey be a sliding Caton phenomenon, I began to address these Air Jordan Outlet problems, we must first analyze the performance bottleneck slide list somewhere before solve the problem. Because before does not properly use this tool TraceView mainly read TraceView data interface index values ​​below what does it mean ... before I used to analyze the performance StopWatch class, now I feel weak burst ... but in some places is still very simple tools StopWatch easy to use - the Internet can find a lot of blog to introduce the use of 579756 403 Purple White Nike Black Mamba 24 Kobe Sale this tool, many of which are explained some of the some of the methods will tell a rough, including StackOverFlow I adidas adiPure Crazyquick Collegiate Royal/White Q33301 Outlet have not found a good explanation of each data indicator codes TraceView What is the meaning of the answer because I want to solve a list of slide Caton problem, we must find the reasons leading to Caton phenomenon, I find it answered others scattered on StackOverFlow slowly pondering the use of this tool. Now I've learned, at least to understand what is the meaning of each indicator, and finally found the tool is too strong! ʱ?? ʱ?? TraceView interface now look at the entire interface of FIG, the entire interface comprises two parts, the above is the process you test the execution of each thread, each thread per line; The following is the value of various indicators above each method performed part Air Max 2011 Womens Purple Grey of the time line you test process for each thread running, the next figure we can see, there is only one main thread in the main execution, because I slid a little list, main Air Max 2012 Black Navy Blue White thread (UI thread) being plotted View it ~ Then I clicked on the 133 number is a method io.bxbxbai.android.examples.activity.ExpandableLayoutMainActivity $ SimpleAdapter.getItemView, there will be two pieces of data: ParentsChildrenParents represents 133 calls the parent method this method, you can see the number of 130. Children showing another method method 133 call, you can see there are several methods. How do I use TraceView because this list is to analyze the slide Caton problem, I talk about how I use this tool, and how I analysis. Use TraceView There are two main ways: The easiest way is to directly open DDMS, select a process, and then press the above 'Start Method Profiling' button, the other red dot turns black after it means TraceView has started to 585388-083 Anti-Nerf Nike KD V Elite Outlet work. Then I can look at a list of slide (now operating the phone will certainly be very card, because each call Java methods in detecting Android system Dalvik virtual machine, and this is my guess). Operation should not exceed 5s, because the best is small-scale performance tests. Then press the button just pressed, will appear later on the picture above, then you can begin to analyze the. A second way is to use android.os.Debug.startMethodTracing (); and android.os.Debug.stopMethodTracing (); method when running this code, when there will be a trace file is generated in / sdcard directory You can also invoke startMethodTracing (String traceName) Set trace file name, and finally you can use adb pull /sdcard/test.trace / tmp command to copy the trace files to your computer, and then open the DDMS tool will be the first use a picture of the first method is a relatively simple, but very broad range of test, the second in the way that is relatively accurate, but I personally like to use the first, because of its simple, and it is to detect you in one operation. Because the second is more suitable for the performance of a particular detection method, in fact, not the kind of good, scenes and like to see the use of the. ʱ?? ʱ?? Read TraceView indicators in July this year, in fact, I have been using TraceView tool, but then do not understand the meaning of each indicator, there is no note of its powerful place. Read interface indicators in the table below, the data actually means nothing. Online include Android's official website did not have detailed documentation on the use of TraceView tools, this is indeed boring. TraceView interface below the longitudinal axis of the longitudinal axis of the table is that each method, including the JDK, Android SDK, there are native methods, of course, the most important thing is the app you write your own way, some Android systematic approach to the implementation of a long time then there is a great possibility that you call these methods lead to excessive app. Each method has a number in front of, possibly all methods in Incl CPU Time time ordering number (will be mentioned later) can be seen after a point method has two parts, one is the Parents, the other is the Children. 597806-400 Nike LeBron X EXT QS Denim-Pink Outlet Parent representation method call this method, the method can be called the father of Children showing another method call this method, can be called a lot of indicators on the sub-horizontal horizontal method, these indicators What does it mean really bothered me for a long time. ʱ?? ʱ?? Can be measured by a method of performance indicators should be only time, right? One way to be sure is to perform the shorter appointment slightly ~~ 1 Incl Cpu Timedefine inclusive:. Full includes the image above you can see the 0 (toplevel) are Incl Cpu Time accounted for 100% of the time, this does not mean that 100% time is it in execution, see the code below: public void top () {a (); b (); c (); d ();} Incl 2015 Nike Free 5.0 Cpu Time indicates the total time top execution method, if that method top The Nike Jordan Melo B Mo execution time of 10ms, a method performed 1ms, method b implementation of 2ms, method c implementation of 3ms, method d executed 4ms (here is to give a chestnut, the method performs the actual situation in a, b, c, d of The total time must total time to execute than the top method to be smaller). And top of the execution time calling method approach is 100ms, then: Incl Cpu Timetop10% a10% b20% c30% d40% can be seen from the above figure: toplevel's Incl Cpu Time is 1110.943, and io.bxbxbai.android.examples Incl .activity.ExpandableLayoutMainActivity $ SimpleAdapter.getItemView method Cpu Time to 12.859, indicating that the latter Incl Cpu Time% approximately 1.2% of the index indicates that this method, and the method of sub-method (such as top method a, b, c , d method) total execution time of 2. Excl Cpu Time to understand Incl Cpu Time since you can well understand Excl Cpu Time, or chestnut above the top methods: Method of top Incl Cpu Time minus Nike Lebron 10(X) method a, b, c , Incl Cpu Time time d is the method of top Excl Cpu Time of 3. Incl Real Time this Nike Air Max feeling and almost Incl Cpu Time, Article 7 will be mentioned. 4. Excl Real Time Ibid 5. Calls + Recur Calls / Total This indicator is very important! It represents the number of times the method execution, this indicator has two values, a number of times this Call method call, Recur Call represent the number of recursive calls, see figure: I selected a method, this method can be seen Calls + Recur Calls value is 14 + 0, indicating that this method is called 14 times, but not this one recursive call from the Children of view, a lot of method calls are multiples of 13, indicating that the parent process have a judge, but this is not the point, some Child method calls Calls to 26, indicating that these methods are invoked twice, is not it possible the presence of repeat calls? These are likely to be able to optimize the performance of the place. 6. Cpu Time / Call focus here! ʱ?? ʱ?? ʱ?? ʱ?? ʱ?? ʱ?? ʱ?? ʱ?? ʱ?? This indicator should be said that the most important, you can see from the chart, the number of 133 calls this method was 20 times, and its Incl Cpu Time is 12.859ms, then the method 133 each execution time is 0.643ms (133 this The method is SimpleAdapter of getItemView method) method for an adapter of getView is 0.643ms is very fast (because the adapter is only one TextView, I have to test.) If getView method execution time is very long, it will inevitably lead to a list of slides When generating Caton phenomenon, you can find the longest way in the process of listing Children getView process, analyze the causes of problems: because there is too much calculation? Or because there is 597806-400 Nike LeBron X EXT QS Denim-Pink Outlet an Nike Free 5.0 V2 Women operation to read SD card? Or because the adapter in the View too complicated? Or because the need to have a lot of judgment, set View to display or hide or because of other reasons ... 7 Real Time / CallReal Time and Cpu Time I still do not understand the difference between them, as I understand it should be:. Cpu Time should be a The method of CPU-time Real Time should be the actual running time of Nike Dunk Heels this method is why they will be the difference? CPU may be because the context switch, blocking the actual execution time of the method of GC other reasons than Cpu Time for a little longer. Summary TraceView is a very powerful performance analysis tool, because the use of Android's official website describes the documentation for this tool is small, and some Chinese are also writing a blog copy to copy, did not say in the end how to use. Recently I was doing performance analysis in this area, slowly pondering the use of such tools, I found to be very strong, write down summary. Android performance analysis tools, there are many, such as: Eclipse Memory Analyzer Tool to analyze memory usage Android app Dump UI Hierarchy for UI Atomator, analysis UI hierarchy systrace other toolbar The following figure this one had a lot of performance analysis tools ~~~proper use of Android performance analysis tools --TraceView