Upgrade to Pro — share decks privately, control downloads, hide ads and more …

為什麼 App 卡卡的

3f7d9611fc919c98512b779cde637dfc?s=47 Johnlin
November 08, 2020

為什麼 App 卡卡的

iPlayground 2020 Keynote

3f7d9611fc919c98512b779cde637dfc?s=128

Johnlin

November 08, 2020
Tweet

Transcript

  1. Safe Area @johnlinvc ҝॄኄ App 㠡㠡తʁ John Lin ( @johnlinvc

    )
  2. Safe Area @johnlinvc John Lin (@johnlinvc) • ኺ iPhone OS

    2 ։࢝ሜ Obj-Cɻ • ໨લࡏ West Pharmaceutical ᙛ DevOpsɻ
 ሢ໳ሜڅ։ᚙऀʢแؚࣗݾʣ༻త޻۩ɻ
 ؐ༗मผਓత Bugɻ
  3. Safe Area @johnlinvc تᓣჩՃࣾ܈׆ಈ Functional Tuesday Ruby Taiwan Elixier Taiwan

    Taipei.py Clojure Taiwan
  4. Safe Area @johnlinvc Swift Taipei • ኺ 2016 ೥ 1/14։࢝ɼࡏ㑌ݸ݄తୈҰݸᜌ፨ೋᎯ㭎ɻ౸໨લቮៃ㭎ྃ

    ઀ۙ 60 ࣍ᡉ။ɻ • ఏڙେՈҰݸೳⴺ์ᱷ౼࿦ Swift త஍ํɻ • ڧྗ㐸ٻߨऀதɻ୞ཁ࿨ Swift ᜗ඍ༗૬᮫త౎ඇৗᓣܴɻ
  5. Safe Area @johnlinvc ৗৗࡏݚ౼။্෼ڗ RubyConf CN

  6. Safe Area @johnlinvc iPlayground • ڈྃ iOSDC Japan ޙ᧷ಘ୆ᖯ໵ጯ֘༗ •

    ᙛ৔ങྃ iosdc.tw ໢Ҭɻ • ޙိܾఆཁڣ iPlaygroundɻ
 iosdc.tw ။ಋ౸ iplayground.io
  7. Safe Area @johnlinvc ୈҰ࣍ߨ Keynote • ᅳ㚎֎ߨྃेز࣍ɼײँओ㭎ํڅզṜݸػ။ိᙛ Keynote ߨऀɻ •

    ऴԙՄҎ༻ Keynote ိ၏ Keynote ྃɻ
  8. Safe Area @johnlinvc

  9. Safe Area @johnlinvc iPlayground తओ୊ • ᙛવؐੋᅴ៴ࡏ App (ෆੋ˖ʽҰʽҰ) ্,ɻ

    • ෼ڗ૬᮫తመ຿ʢҏཕʣៃᱛɻ • ୳ࡧߋଟ։ᚙ্తՄೳੑɻ
  10. Safe Area @johnlinvc Ұݸ޷ App తᑍ݅ 1. ූ߹঎ۀधٻɻ 2. ༻ىိॱखɻ

    3. Optional<ඬ྄తఔࣜᛰ>ɻ
  11. Safe Area @johnlinvc Ұݸ޷ App తᑍ݅ 1. ූ߹঎ۀधٻɻ 2. ༻ىိॱखɻ

    3. Optional<ඬ྄తఔࣜᛰ>ɻ
  12. Safe Area @johnlinvc ၏աҰਞࢠతਓػհ໘ݚڀ

  13. Safe Area @johnlinvc ॄኄੋॱख • ֎᧺ඬ྄ • ᔒ༗൓ਓྨతૢ࡞ྲྀఔ • ߦҝූ߹࢖༻ऀ༬ظ

  14. Safe Area @johnlinvc ॄኄੋॱख • ֎᧺ඬ྄ • ᔒ༗൓ਓྨతૢ࡞ྲྀఔ • ߦҝූ߹࢖༻ऀ༬ظ

  15. Safe Area @johnlinvc ࢖༻ऀ༬ظతߦҝ • ࢖༻ऀత༌ೖཁ༗దᙛతճᰶɻ • ྗճᰶɻ • ࢹ᧷ճᰶɻ

  16. Safe Area @johnlinvc ྗճᰶ • ଧ伴൫త࣌ީ௨ৗෆ။؃伴൫ɻ
 ػց伴൫తྗճᰶᩋզ၇҈ىိൺֱਅመɻ • iPhone 7/8

    ্తHome伴ɻ
 ଖመੋݻఆతɼᯪ਒ಈᩋզ၇ײ᧷༗҈Լڈతײ᧷ɻ
  17. Safe Area @johnlinvc ࢹ᧷ճᰶ • ᦊນ্త࢖༻ऀհ໘౎ੋࢹ᧷ճᰶతҰ෦෼ɻ • ᴍ㐝ޙతճᰶɼ૾ੋબᎩޙతᏓ৭ɼ
 ҃ੋҠಈ౸ԼҰݸᙘ໘ɻ •

    䇪ಈޙతճᰶɼ૾ੋᰖֹࣔ֎త㚎༰ɼ
 ҃ੋҠಈᙘ໘্త෺ᱪɻ
  18. Safe Area @johnlinvc ॄኄੋ㠡㠡తʁ • ࿝䷩㘸㠡㠡తɻ • ᙘ໘ෆ࿈᠃ɻ • ༌ೖ౸ࢹ᧷ճᰶత࣌ؒࠩଠ௕ɻ

  19. Safe Area @johnlinvc ᙘ໘త࿈᠃ੑ • ਅመੈքత෺ᱪతҠಈੋ࿈᠃తɻ • ࡏᰖࣔ෺ᱪҠಈ࣌ɼ೗Ռਓ؟ೳⴺᚙݱ
 தؒ༗ඃ௓աతᙘ໘ɻब။᧷ಘ㠡㠡తɻ

  20. Safe Area @johnlinvc ਓ؟తහ㕔౓ • 1991 ೥తݚڀɻࢹਆៃࡉ๔ሣᦊນરᗜత൓ጯɻ • ༻ిۃఁଌਓᱪࢹਆៃሣ CRT

    ᦊນરᗜత൓ጯɻ • Human electroretinogram responses to video displays,
 fluorescent lighting, and other high frequency sources
  21. Safe Area @johnlinvc ਓ؟ՄҎ؃౸ 76 Hz తરᗜ

  22. Safe Area @johnlinvc ༌ೖ౸ࢹ᧷ճᰶత࣌ؒࠩ • ਅመੈքత෺ᱪडྗޙ။ཱࠁҠಈɼ
 ᔒ༗೚Կ࣌ؒࠩɻ • ࢖༻ऀૢ࡞ޙաྃଠٱ࠽㗞ੜࢹ᧷ճᰶత࿩ɼ
 ब။᧷ಘ㠡㠡తɻ

  23. Safe Area @johnlinvc ճᰶཁଟշ࠽ⴺշ • 2015 ೥తݚڀɼ
 ଌࢼ࢖༻ऀሣᨀ߇༌ೖతࢹ᧷ճᰶԆᬌ
 త༰೜౓ɻ •

    How Much Faster is Fast Enough? 
 User Perception of Latency &
 Latency Improvements in
 Direct and Indirect Touch
  24. Safe Area @johnlinvc ճᰶཁଟշ࠽ⴺշ • ሣԙᴍ㐝࿨䇪፮༗ෆಉత༰೜౓ɻ • ᴍ㐝 69 ms

    • 䇪፮ 11 ms
  25. Safe Area @johnlinvc ҝॄኄ။㠡㠡తʁ

  26. Safe Area @johnlinvc > զ၇ိ໰Ұݸ኷؆ᄸత໰୊ɿզ၇ॴሜաతఔࣜɼେଟ౎ੋኺ಄౸ඌɺ ҰߦҰߦԟԼࣥߦɼࣥߦ׬ඟɼఔࣜब݁ଋʀಹኄɼҰݸ GUI ጯ༻ఔࣜ —ແ࿦ੋզ၇ݱࡏਖ਼ࡏላशత iOS

    ᢛ Mac OS Xɺؐੋଖଞฏ୆—ҝॄኄ ෆੋଧ։೭ޙҰ࿏ࣥߦ౸ఈ݁ଋɼࣕੋ။ఀཹࡏᦊນத౳଴զ၇ૢ࡞ʁ KKBOX iOS/Mac OS X جૅ։ᚙڭࡐ
  27. Safe Area @johnlinvc Run loop

  28. Safe Area @johnlinvc Ұݸ loop ཫ໘ཁ၏తࣄ ߋ৽ᙘ໘ Auto Release ᨀᚙ

    Timer ઀Ꮕࣄ݅ ႔ཧࣄ݅
  29. Safe Area @johnlinvc Run Loop ᔒ༗ݻఆతिظ • ཁ౳౸ݱ༗త loop 䋯׬೭ޙɼ࠽။䋯ԼҰݸ

    loopɻ • ೗Ռࡏ Event Handler ཫ໘၏ྃଠଟࣄɼब။ᩋԼҰݸ loop Ԇޙ։ ࢝ɻ
 
 0 35 70 105 140 Loop 1 Loop 2 Loop 2
  30. Safe Area @johnlinvc Ұݸ loop Ֆྃଠଟ࣌ؒ • ႔ཧ׈ಈ௒ա 11 ms

    => ׈ಈ㠡㠡త • ႔ཧᴍ㐝௒ա 69 ms => ᴍ㐝㠡㠡త
  31. Safe Area @johnlinvc ղܾํ๏ • ॏෳར༻ view/cell/asset ɻ • ޷޷ར༻ଟ֩৺႔ཧثɻ

  32. Safe Area @johnlinvc ղܾํ๏ • ॏෳར༻ view/cell/asset ɻ • ޷޷ར༻ଟ֩৺႔ཧثɻ

  33. Safe Area @johnlinvc ॏෳ࢖༻ View/Cell • UICollectionView
 dequeueReusableCell(withReuseIdentifier:for:) • UIImage


    Cached: init(named:)
 Not Cached: init(contentsOfFile:) • MKMapView
 dequeueReusableAnnotationView(withIdentifier:)
  34. Safe Area @johnlinvc Reusable • https://github.com/AliSoftware/Reusable • ՄҎ༻ Type Safe

    తํ๏ိఆٛ Reuse identifier. final class CustomCell: UITableViewCell, Reusable tableView.register(cellType: theCellClass.self) let cell = tableView.dequeueReusableCell(for: indexPath) as MyCustomCell
  35. Safe Area @johnlinvc ղܾํ๏ • ॏෳར༻ view/cell/asset ɻ • ޷޷ར༻ଟ֩৺႔ཧثɻ

  36. Safe Area @johnlinvc ଟ֩৺႔ཧث • iPhone 12 ্༗ 6 ݸ

    CPU ֩৺ɻ • ՄҎಉ࣌ࣥߦଟݸࣥߦॹɻ • ୞ཁ೺ࣄ৘෼ࢄ౸֤ݸ֩৺ɼबՄҎॖ୹ run loop ႔ཧ࣌ؒɻ
  37. Safe Area @johnlinvc ࡏผత thread ၏ࣄతํ๏ • Dispatch • Combine

  38. Safe Area @johnlinvc ࡏผత thread ၏ࣄతํ๏ • Dispatch • Combine

  39. Safe Area @johnlinvc Dispatch • ࢖༻ Obj-C block & Swift

    closure ိ෧᧋ Thread APIɻ • جຊ্बੋ೺ code 㟚౸ queue ཫɼሏब။㢨㟬ࣥߦɻ
  40. Safe Area @johnlinvc Dispatch • ༻ DispatchQueue.async बՄҎᩋ code ࡏผత

    Thread 䋯ɻ DispatchQueue.global(qos: .background).async { // code to run }
  41. Safe Area @johnlinvc Refactoring legacy and concurrent thread API with

    Testing
  42. Safe Area @johnlinvc ࡏผత thread ၏ࣄతํ๏ • Dispatch • Combine

  43. Safe Area @johnlinvc Combine • ༻એࠂࣜతޠ๏ိఆٛࢿྉᢛࣄ݅႔ཧྲྀఔɻ • Scheduler ՄҎઃఆ૝ཁࡏ䬟Ұݸ Thread

    ্႔ཧࢿྉᢛࣄ݅ɻ
  44. Safe Area @johnlinvc Combine • ՄҎ༻ receive(on:) ੾׵ Thread/Queue Just(1)

    .map { _ in print(Thread.isMainThread) } // true .receive(on: DispatchQueue.global()) .map { print(Thread.isMainThread) } // false .sink { print(Thread.isMainThread) } // false
  45. Safe Area @johnlinvc ଧ։ Combine తҾ№֖ိ؃؃

  46. Safe Area @johnlinvc UIKit ୞ೳࡏ main Thread ݺڣ • UIKit

    ᔒ༗ Thread Safetyɻ • ࡏผత஍ํݺڣత࿩။༗ Error ɻ • UI API called on a background thread: -[UIView initWithFrame:]
  47. Safe Area @johnlinvc ආ໔ UIKit thread ໰୊ • ࡏ Dispatch

    ཫ༻ DispatchQueue.main ੾׵ճ Main Thread • ࡏ Combine ཫ༻ receive(on:) ੾׵ճ Main Thread • ࢖༻ SwiftUI
  48. Safe Area @johnlinvc ආ໔ UIKit thread ໰୊ • ࡏ Dispatch

    ཫ༻ DispatchQueue.main ੾׵ճ Main Thread • ࡏ Combine ཫ༻ receive(on:) ੾׵ճ Main Thread • ࢖༻ SwiftUI
  49. Safe Area @johnlinvc Swift UI • એࠂࣜత UI Frameworkɻ •

    ލฏ୆ɻ • Auto Layoutɻ
  50. Safe Area @johnlinvc ࢖༻ Swift UI struct ContentView: View {

    @State var clickCount : Int = 0 var body: some View { Button(action: add) { Text("\(clickCount)") .font(.system(size: 120)) } } func add() { clickCount += 1 } }
  51. Safe Area @johnlinvc ࢖༻ Swift UI struct ContentView: View {

    @State var clickCount : Int = 0 var body: some View { Button(action: add) { Text("\(clickCount)") .font(.system(size: 120)) } } func add() { clickCount += 1 } }
  52. Safe Area @johnlinvc ࢖༻ Swift UI struct ContentView: View {

    @State var clickCount : Int = 0 var body: some View { Button(action: add) { Text("\(clickCount)") .font(.system(size: 120)) } } func add() { DispatchQueue.global().async{ clickCount += 1 } } }
  53. Safe Area @johnlinvc ࢖༻ Swift UI struct ContentView: View {

    @State var clickCount : Int = 0 var body: some View { Button(action: add) { Text("\(clickCount)") .font(.system(size: 120)) } } func add() { DispatchQueue.global().async{ clickCount += 1 } } }
  54. Safe Area @johnlinvc ࢖༻ Swift UI • ߋ৽UI ௨ৗ౎ੋಁա @State

    property wrapperɻ • @State ੋ Thread safe తɻՄҎኺ೚Կ Thread मվଞతᆴɻ
  55. Safe Area @johnlinvc ղܾํ๏ • ॏෳར༻ view/cell/asset ɻ • ޷޷ར༻ଟ֩৺႔ཧثɻ

  56. Safe Area @johnlinvc ෆ஌ಓኺ䬟։࢝վʁ

  57. Safe Area @johnlinvc ෧᧋ʂ෧᧋ʂ࠶෧᧋ʂզཁ੒ҝ෧᧋େࢣʂ

  58. Safe Area @johnlinvc ์։ಹݸ MVC

  59. Safe Area @johnlinvc ख೺खት㟬༻ Clean Swift ॏߏ MVC, ฒସ֩৺ఔࣜᛰḤ ሜᄸݩଌࢼ

  60. Safe Area @johnlinvc ዑվᆦʁዑվଠٱʁ

  61. Safe Area @johnlinvc ኺᘐཱ։ᚙ౸େܕሢҊత CI/CD ߈ུ

  62. Safe Area @johnlinvc iOS ։ᚙऀ 13 ഒ଎ٕ޼

  63. Safe Area @johnlinvc ࡏผత thread ၏ࣄతํ๏ • Dispatch • Combine

  64. Safe Area @johnlinvc ೗Ռ֩৺໵શᕝྃʁ • ਅత༗ଠଟࣄ৘ཁ၏ɼबࢉ༻ྃ Dispatch/Combine/async ໵။㠡ʁ • ਅతᔒ༗㭎๏ྃ䆩ʁ

  65. Safe Area @johnlinvc 㟬༗ᔒ༗૝աʁ • ᙛఔࣜ㠡ॅత࣌ީɼॴ༗తૢ࡞౎။㠡ॅɻ • ୞༗Ұछૢ࡞ෆ။ɼܥ౷㚎ݐతɻ૾ੋ Home 伴ɻ

  66. Safe Area @johnlinvc ҝॄኄ Home 伴័ੋ༗༻ʁ • ཧ࿦্ɼᙛఔࣜ㠡ࡏ run loop

    தత࣌ީɼੋᔒ㭎๏઀Ꮕᨀ߇ࣄ݅తɻ • طવᔒ㭎๏઀Ꮕࣄ݅ɼ޲্׈తख੎ጯ֘ᔒ༗೚Կ࡞༻࠽ሣʁ
  67. Safe Area @johnlinvc ిᡵՊላܯࠂ ిᡵՊላ ࠷৽తᐽՍ ೈᱪ޻ఔࢣ 


  68. Safe Area @johnlinvc Darwin-XNU macOS & iOS ౳౳࢖༻తఈ ૚֩৺ Mach

    ੋඍ֩৺ BSD ఏڙ POSIX & Unix API
  69. Safe Area @johnlinvc ෼࣌ܥ౷ • iPhone 12 ༗࿡ݸ֩৺ɼୠੋզ၇ჟՄҎಉ࣌䋯্ඦݸ DispatchQueue/Threadɻ •

    ҼҝҰݸ֩৺্ՄҎಁա෼࣌ܥ౷䋯௒աҰݸthreadɻ
  70. Safe Area @johnlinvc ෼࣌ܥ౷ Thread

  71. Safe Area @johnlinvc Context Switch • ೺໨લఔࣜతهԱᱪ࿨࢑ଘثత㚎༰
 ه㑚ىိɻ • ೺ԼҰݸఔࣜతهԱᱪ࿨࢑ଘثత㚎༰


    ኺه㑚ཫճ෴ɻ • ೺ PC (Program Counterʣࢦ޲ԼҰݸఔࣜɼ
 ໵बੋ೺߇੍ᒟަڅԼҰݸఔࣜɻ Thread
  72. Safe Area @johnlinvc Context Switch • ࡞ۀܥ౷ཁዎኄ೺߇੍ᒟ፤ճိʁ • ߹࡞ࣜ੾׵ɿࡏಛఆ࡞ۀ࣌੾׵ •

    ඇ߹࡞ࣜ੾׵ɿ࡞ۀܥ౷ܾఆ Thread
  73. Safe Area @johnlinvc Context Switch • ࡞ۀܥ౷ཁዎኄ೺߇੍ᒟ፤ճိʁ • ߹࡞ࣜ੾׵ɿࡏಛఆ࡞ۀ࣌੾׵ •

    ඇ߹࡞ࣜ੾׵ɿ࡞ۀܥ౷ܾఆ Thread
  74. Safe Area @johnlinvc ߹࡞ࣜ੾׵ • ᙛఔࣜࣥߦ system call ࣌ (

    IO, ݐཱ Threadʣ။೺߇੍ᒟަؐڅ࡞ۀ ܥ౷ɼṜݸ࣌ީब༗ػ။၏੾׵ɻ • ᙛఔࣜࣥߦඇ๏ࢦྩ࣌ (1/0, ᩇෆ߹๏తهԱᱪҐஔʣ။ᨀᚙ trapɼṜ ࣌ީܥ౷໵။औಘ߇੍ᒟɼ໵༗ػ။၏੾׵ɻ
  75. Safe Area @johnlinvc ߹࡞ࣜ੾׵త໰୊ • ೗ՌఔࣜӬԕෆݺڣsystem call ɻ૾ੋԼ໘Ṝᒬɼब။Ӭԕᔒ㭎๏੾ ׵ɻ •

    for true { 1+1} • MacOS 9 Ҏલੋ࢖༻߹࡞ࣜ੾׵ɼॴҎᄸҰఔࣜ༗Մೳ㠡ॅ੔ݸܥ౷
  76. Safe Area @johnlinvc Run loop ੋҰछ߹࡞ࣜ੾׵ • 㑌Ұ࣍త loop ౎ཁ౳

    Event Handler ႔ཧ׬࠽။ਐԼҰݸ loopɻ • Dispatch ཁ౳ݱࡏత task ႔ཧ׬࠽။ަग़߇੍ᒟɻ • ॴҎ༗೚ԿҰݸ Event/Task ႔ཧଠٱɼ App ब။㠡ॅɻ
  77. Safe Area @johnlinvc Context Switch • ࡞ۀܥ౷ཁዎኄ೺߇੍ᒟ፤ճိʁ • ߹࡞ࣜ੾׵ɿࡏಛఆ࡞ۀ࣌੾׵ •

    ඇ߹࡞ࣜ੾׵ɿ࡞ۀܥ౷ܾఆ Thread
  78. Safe Area @johnlinvc ඇ߹࡞ࣜ੾׵ • ܥ౷ཁ೺߇੍ᒟަڅԼҰݸ࣌ɼ။ઃఆҰݸߗᱪܭ࣌ثɻ • ܭ࣌ث࣌ؒ౸ޙ။ᨀᚙҰݸTrapɼ೺߇੍ᒟڧ੍ަڅܥ౷ɻ • ೗Ռ࣌ؒ౸લबަճ߇੍ᒟత࿩ɼबॏஔܭ࣌ثɻ

  79. Safe Area @johnlinvc 0x8BADF00D • ೗Ռ༗ఔࣜաྃ኷ٱ౎ᔒ༗ਐలɻ • Darwin ။⬏ಈ WatchDog

    Timerɻ೺ಹݸఔࣜऴࢭɻ • ࡨޡ୅ᛰबੋ 0x8BADF00D, ate bad foodɻ
  80. Safe Area @johnlinvc Darwin-XNU ࢖༻ඇ߹࡞ࣜ੾׵ • ᙛᄸҰఔࣜ㠡ॅత࣌ީɼෆ။Өڹଖଞఔࣜɻ • ᙛ App

    㠡ॅత࣌ީɼ SpringBoard ෆ။ඃӨڹɼॴҎ Home ؐੋՄҎ ਖ਼ৗӡ࡞ɻ
  81. Safe Area @johnlinvc ᩋ Run loop ༻ඇ߹࡞੾׵? • ઃఆ㑌ݸ loop

    ՄҎ༻ိ႔ཧ Event త࣌ؒɻᙛ࣌ؒ౸త࣌ީबڧ੍ަ ग़߇੍ᒟɻ • ԼҰݸ loop ࠶៺᠃߶߶ᔒ၏׬తࣄɻ
  82. Safe Area @johnlinvc Bringing Theory Into Practice: A Userspace Library

    for Multicore Real-Time Scheduling • ࡏ Linux త Userspace ্ࣥߦత noncooperative schedulerɻ • ՄҎࡏ࢖༻ऀతఔࣜ㚎໛ٖ OS త੾׵ɻ • ໵बੋ㘸ɼՄҎᩋ UI ෆ။㠡ॅɻ
  83. Safe Area @johnlinvc Մೳతመ࡞ํ๏ • ಛ੡త Combine Scheduler ɼᙛ࣌ؒ౸बఀࢭɼԼҰݸ loop

    ࣗಈॏ ࢼɻ • Swift main branch መᱛதత Async/Await + Actorɼᙛᔒ༗ڞڗهԱᱪ ࣌ɼtask बՄҎॏࢼ׌ᔒ༗ෆ૝ཁత෭࡞༻ɻ
  84. Safe Area @johnlinvc run loop ඇ߹࡞੾׵త᠍ᴍ • ᔒሜ޷త࿩ɼՄೳ။༗ଟ࣍త෭࡞༻ɼ૾ੋ print 䋯ྃၷ࣍ɻ

    • ᙘ໘Մೳ။༗ෆ׬੔తߋ৽ɻҼҝߋ৽౸Ұ൒बඃதᏗྃɻ
  85. Safe Area @johnlinvc UIKit SwiftUI ඇ߹࡞ࣜ 
 run loop ༏ᴍ

    ࠷੒ख़ ՄҎ೺ॴ༗తࣄ౎ Ҡ౸ଖଞ Thread ሜग़ိతAppҰఆෆ ။㠡㠡 ᠍ᴍ ࠷೉ሜग़ෆ။㠡㠡 తApp ؐෆ੒ख़ ᙘ໘Մೳߋ৽ෆ׬શ ޷૾ؐᔒ༗ਓ၏
  86. Safe Area @johnlinvc ॄኄੋ App 㠡㠡 ? • ᙘ໘తߋ৽ස཰௿ԙ 76Hz

    • ׈ಈ௒ա 11 ms ᔒ༗ճᰶ • ᴍ㐝௒ա 69 ms ᔒ༗ճᰶ
  87. Safe Area @johnlinvc App 㠡㠡త • Run loop తҰݸ loop

    䋯ྃଠٱɻ䇪౸ྃԼҰݸ loopɻ • ᔒ㭎๏ߋ৽ᙘ໘ɻ • ᔒ㭎๏઀Ꮕ༌ೖɻ
  88. Safe Area @johnlinvc App 㠡㠡త႔ཧํ๏ • ॖ୹ӡࢉ࣌ؒɼ࢖༻շऔɼCell Reuseɻ • ࢖༻

    GCD, Combine ိ೺ࣄ৘Ҡ౸ run loop ֎ࣥߦɻ
  89. Safe Area @johnlinvc ະိల๬ • Async / Await ՄҎᩋզ၇ߋ༰қ೺ࣄ৘Ҡ౸ଖଞ Thread

    ႔ཧɻ • 㘸ෆఆՄҎࡏ App 㚎၏ඇ߹࡞ࣜ schedulingɼ༗ڵझతՄҎ౳౳ိҰ ىݚڀݚڀɻ
  90. Safe Area @johnlinvc References • https://stackoverflow.com/questions/18738453/how-does-the-compiler- know-a-button-has-been-pressed/18739381 • https://www.objc.io/issues/3-views/moving-pixels-onto-the-screen/ •

    https://zonble.gitbooks.io/kkbox-ios-dev/content/responder/run_loop.html • http://pages.cs.wisc.edu/~remzi/OSTEP/ • https://yuriktech.com/2020/03/07/User-Space-Scheduling/ • Apple Developer Documentation
  91. Safe Area @johnlinvc References • https://semianalysis.com/apples-a14-packs-134-million-transistors- mm2-but-falls-far-short-of-tsmcs-density-claims/ • https://ckitakishi.com/2016/08/17/WatchDog- %E6%9C%BA%E5%88%B6/

  92. Safe Area @johnlinvc Q&A • ౤ӨยతҐஔࡏ https://bit.ly/3n4rZO4 • John Lin


    Twitter: @johnlinvc • ᓣܴိ Swift Taipei ෼ڗ҃ᡅᡅ