Font Size: a A A

User Experience Oriented GC Strategy Analysis And Optimization

Posted on:2016-04-25Degree:MasterType:Thesis
Country:ChinaCandidate:H WangFull Text:PDF
GTID:2308330503477491Subject:IC Engineering
Abstract/Summary:PDF Full Text Request
The Dalvik virtual machine is the core of Android operating system, which loads and excutes applications written in Java language. Like other java virtual machines, the Dalvik Virtual Machine needs provide garbage collector to implement automatic memory management. This characteristic can simplify programer’s design progress and avoid memory leaks. However, it also brings side effects such as memory resident and response delay. In this paper, we first analyzed the current garbage collection algorithm and the object allocating strategy. Then, we presented a new GC strategy which focused on the improvement of user experience.Native dalvik garbage collection does not distinguish UI threads from other threads. To improve user experience, we introduce a dedicated UI thread heap, which accelerates the response speed of UI threads and reduces the pause time caused by allocating objects in UI threads. As a result, the frames rendering speed as well as the touching response have been improved. In addition, due to the fact that frequent long-term suspension seriously affects the user experience, we also use an emergency buffer heap to reduce pause time caused by full garbage collection. Furthermore, a quantitative evaluation menthod of user experience has been introduced in this paper as well.Comparing to native strategy(Android 4.2), experiments show the following results: through the mearsurement of 128 random frames generation, the average time of the onDraw() method has been reduced 7%, and the number of long-term pauses has been dropped from 8 times to 2 times. The new GC strategy reduces the number of such pauses form 78 times to 59 times and eliminates all FULL GCs, according to the log file analysis. The average GC pause time decreases from 14.55ms to 7.15ms, the average pause time gets a decline of 50.8%. Standard deviation of pause time decreases from 20.56 to 11.94.
Keywords/Search Tags:Android, Dalvik, Garbage Collection, Strategy, User Experience
PDF Full Text Request
Related items