Aurora Developer Salon Mobile Application performance Optimization Practice "one" old wine new bottle--Change the angle to improve the quality of the APP

Source: Internet
Author: User

Old wine New bottle--Change the angle to improve the performance and quality of the APP

Speaker: Gaoliangliang---Hungry? Mobile Technology Senior iOS engineer, responsible for hungry? Business Edition iOS app development, deep research on architecture and system bottom, good at mobile performance analysis, trouble shooting,ios reverse programming.

Speaker Time: 2017-05-26

  

Speaker Content:

1, Performance and Quality Overview:

2. Introduction and practice of "new" technology concept:

3, contrary to the conventional "truth":

  

First, performance and quality Overview:

? Application classification and relationship to performance quality

? Design the lifting plan according to the equipment characteristics

? Prioritize with major business scenarios

  Reflow (Reflow)/Redraw (Repaint)

  

? Reflow: The layout is recalculated due to changes in the reference element layout box under Flow layout.

? Redraw: Renders the view again without changing the element layout.

Case REPLAY:

  

? Single order view as the base unit for reuse

? Complex view levels with dynamic layout techniques

? Views are not fixed and strong dependencies exist

? Product List produces severe reflow when scrolling

Second, the solution

? Adjust the view relation, utilize the reuse mechanism rationally, avoid the reflow in rolling

? ADK scheme, asynchronous computing layout and caching, Fine line program control

  

Throttle (throttle)/anti-shake (debounce)

  

Case Replay

Self-ddos caused by failed retries

? Automatic retry with guaranteed service and fixed retry frequency

? Ignore error type, "one-size-fits-all" DFF design

? Retry cycle synchronization, resulting in a vicious cycle

Solution:

? Exponential fallback-double the fixed retry interval

? Add jitter-random jitter interval to avoid locking the synchronization cycle

? Tag Retry--Prioritize high retry requests

? "Gold" Retry throttle policy

  

Extended Use

? Real-time query stabilization-Reduce network requests

? Event response throttling--avoid redundant resource consumption

? Interface rendering throttling-avoids a lot of CPU consumption

Progressive Enhancement (PE)/graceful downgrade (GD)
  

Case Replay:

A push system based on three-party service

? The real-time and reliability requirements of the same business for push are high and different

---? Take advantage of better components as a first choice, three-party as an alternative

  ? Three-party services are not controllable, and in real-time, reliability, there are deficiencies

  ---? The efficiency and speed of operation decreases with the increase of the failure components.

Solution:

  

Taco Hybrid Push Frame

device

platform

system

front and back table

send number

successful number

receive messages

arrival rate

red Note3

android

miui 8

Span style= "Background-color: #ffffff" > front desk (lock screen)

300

297

267

89.9%

hammer

Android

smartisan OS 3.2.5

Span style= "Background-color: #ffffff" > background (lock screen)

300< /span>

298

250

83.9%

NEXUS5

android

6.0

background (lock screen)

300

296

234

79.1%

iphone 6

ios

ios 9.1

front desk (lock screen)

300

299

299

100%

IPhone 4s

Ios

IOS 8

Front Desk (lock screen)

300

296

178

60.1%

Stability = fast = Province, Universal law

  ? 0 Crash &0 Error! = good

  ? Start time: Main () before main () important

? Package Volume Optimization: input > Resources

  ? Power consumption optimization: hardware > Software

0 Crashes & 0 error! = good

  

  

0 Crashes & 0 error! = good

  

Start time: Main () before main () important

  ? Main () Pre-optimization point

    ? Dylib loading--is the system dynamic library, the common use static library

    ? Low rebase/binding--, reduced Class behavior violates software engineering principles

? OBJC setup--is affected by engineering quantity, and blind optimization violates engineering principle

    ? initializer--+ load optimization, affecting engineering design

? Main () post-optimization point

    ? Screen Rendering optimization

    ? Avoid main thread blocking

    ? Critical Path Threading Optimization

Package Volume Optimization: binary > Resource consumption optimization: hardware > Software

     

Power consumption optimization: hardware > Software

    

Aurora Developer Salon Mobile Application performance Optimization Practice "one" old wine new bottle--Change the angle to improve the quality of the APP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.