DroidKaigi 2016 パフォーマンスを追求したAndroidアプリを作るには

563fab68d455c8543d319436db4819b0?s=47 Takashi EGAWA
February 19, 2016

DroidKaigi 2016 パフォーマンスを追求したAndroidアプリを作るには

563fab68d455c8543d319436db4819b0?s=128

Takashi EGAWA

February 19, 2016
Tweet

Transcript

  1. %SPJE,BJHJ ύϑΥʔϚϯεΛ௥ٻͨ͠ ΞϓϦΛ࡞Δʹ͸ ߐ઒ਸ UFHBXB!HNBJMDPN 4NBSUJVN ג  (PPHMF%FWFMPQFS&YQFSU 

  2. ਫ਼ਆ͕පΈͦ͏  ΍ͬͯ΋ײँ͞Εͳ͍  ஍ຯɾ҉͍  ΊΜͲ͏ɾμϧ͍  ΞϯέʔτύϑΥʔϚϯε޲্ʹ͍ͭͯͷҹ৅ ର৅ट౎ݍࡏॅͷ"OESPJE։ൃऀ

    ਓ  
  3. ஍ຯͰ͋Γ໘౗Ͱ͋Γ೔ӄऀͰ͋Δ ͕ͩɼݸਓతʹ͸ ͜ΕΛؤுΕΔ͔Ͳ͏͔͕ σϕϩούʔͱͯ͠ͷՁ஋Λେ͖͘ ࠨӈ͢Δʢؾ͕͢Δʣ ͳͷͰɼ࿩͍ͨ͠ 

  4. ͸͡Ίʹ ͓࿩͢͠Δ͜ͱ ࢲͷ೔ৗతͳऔΓ૊ΈΛൈਮ͓ͯ͠࿩͠͠·͢ ϦʔζφϒϧʹऔΓ૊ΊΔ͜ͱΛ঺հ͠·͢ एׯEVNQTZTଟΊͱͳ͓ͬͯΓ·͢ ίϯςΩετ 4%,Λ࢖ͬͨҰൠతͳΞϓϦ 

  5. %SPJE,BJHJ ύϑΥʔϚϯεΛ௥ٻͨ͠ ΞϓϦΛ࡞Δ ͨΊʹऔΓ૊ΜͰ͍Δ͜ͱ ߐ઒ਸ UFHBXB!HNBJMDPN 4NBSUJVN ג  (PPHMF%FWFMPQFS&YQFSU

    
  6. ϓϩάϥϛϯάςΫχοΫʹ͍ͭͯ͸ 6EBDJUZͰֶ΅͏ 4UVEZ+BNTϓϩάϥϜ΁ͷࢀՃొ࿥͸ͪ͜Β  IUUQTFWFOUTXJUIHPPHMFDPNTUVEZKBNTKBQBO 4UVEZ+BNTϓϩάϥϜ΁ͷࢀՃొ࿥Λ͠6EBDJUZͷର৅ίʔεʹొ ࿥͢Δͱɺઐ༻ΦϯϥΠϯίϛϡχςΟʹࢀՃͰ͖·͢ɽ  

  7. w ిྗফඅ w 6* w ͦͷଞ ௨৴  ϝϞϦ ϓϩηοα

     ηϯαͳͲ ύϑΥʔϚϯεͷࢦඪ΍ཁҼ͸ ೔ʑෳࡶԽ͍ͯ͠Δ ༷ʑͳ؍఺Ͱͷଟ֯తͳ੾Γޱ Ͱߟ͑Δ w ه࿥ w ՄࢹԽ w ؆୯ खܰ ਪଌ΍ࢥ͍ࠐΈ͸ؒҧؚ͍͕· ΕΔʢ౎ࢢ఻આʣ આ໌Ͱ͖ͳ͍ͱۤ࿑͢Δ ೔ৗతʹແཧͳ͘ߦ͏ ʢߦ͑Δ͜ͱΛ΍Δʣ ύϑΥʔϚϯεʹ͍ͭͯͷ ݸਓతͳجຊݪଇ ଟ֯తͳ؍఺ ܭଌɾܧଓ 
  8. ܭଌ͸ະڅిͰ $ dumpsys battery unplug Current Battery Service state: (UPDATES

    STOPPED -- use 'reset' to restart) AC powered: false USB powered: false Wireless powered: false status: 2 νϟʔδ͞Ε͍ͯΔͱ͖͸σόΠεͷৼΔ෣͍͕มΘΔ جຊతʹະڅిঢ়ଶͰ΍Δ ຊ౰ʹڅి͠ͳ͍ͷ͕ϕετ ແཧͳΒߋ৽ఀࢭঢ়ଶΛར༻ͯ͠ະڅిঢ়ଶΛ࡞Δ EVNQTZTCBUUFSZVOQMVH·ͨ͸TFUVTC ˞༻͕ࡁΜͩΒͪΌΜͱ໭͢͜ͱʢSFTFUʣΛ͓๨Εͳ͘ 
  9. VOQMVHͷޡղ EVNQTZTCBUUFSZVOQMVHʢ·ͨ͸TFUVTCʣ ͸%P[Fతʹ͸ະڅిঢ়ଶʹͳΔ ͔͠͠όοςϦʔͷεςʔλεʢ#BUUFSZ.BOBHFSʣ తʹ͸ߋ৽ఀࢭঢ়ଶͰ͋Δʹա͗ͳ͍ Αͬͯɼະڅిͷঢ়ଶΛ࡞͔ͬͯΒߋ৽ఀࢭʹ͢Δ Α͘ͳ͛͞ɿ64#Ͱ"%#઀ଓߋ৽ఀࢭ Α͛͞ɿ8J'JͰ"%#઀ଓߋ৽ఀࢭ64#Ͱ"%#࠶઀ଓ $ dumpsys

    battery unplug Current Battery Service state: (UPDATES STOPPED -- use 'reset' to restart) AC powered: false USB powered: false Wireless powered: false status: 2 ˞࣮ͨͩ͠ࡍʹ͸څి͞Ε͍ͯΔͷͰݱ࣮ͷະڅిͱ͸ݫີʹ͸ҟͳΔ 
  10. ΞϓϦ͕όοςϦʔΛ Ͳͷఔ౓ফඅ͢Δ͔ʁ ిྗফඅʹ͍ͭͯ 1IPUPCZ8$/r#BUUFSZ3FDZMJOH$$#:  

  11. ి஑ͷΏͱΓ͸৺ͷΏͱΓ ిྗফඅ͸΋ͬͱ΋ॏཁͳ ύϑΥʔϚϯεࢦඪ  

  12. ࣭໰  

  13. /FYVTͰ ΧϝϥͷϑϥογϡϥΠτ ΛҰ೔த఺౮͠ଓ͚ΔΞϓϦ Λ࡞Γ͍ͨ ࣮ݱՄೳ͔ʁ Ͱ͸൒೔ͳΒʁ࣌ؒͳΒʁ  

  14. ϑϥογϡϥΠτͷফඅిྲྀ ֓ͶN" όοςϦʔ์ి༰ྔ N"I ཧ࿦্࣌ؒఔ౓ʢ˺ʣ  ౰વͷ͜ͱͳ͕Βɼ࣮ࡍʹ͸ଞͷΞϓϦ΍ଞͷػثͷফඅిྗ ʹґଘ͢ΔͷͰߋʹݮΓ·͢ɽ /FYVTͷ৔߹ 

    
  15. ిྲྀফඅྔΛ஌Δʹ͸ GSBNFXPSLSFTBQL Ϧιʔε܈ͷఆٛΛ͍ͯ͠ΔγεςϜ"1, TZTUFNGSBNFXPSLGSBNFXPSLSFTBQL SFTYNMQPXFS@QSPpMFYNM ফඅిྗྔΛఆٛͨ͠9.-ϑΝΠϧ GSBNFXPSLSFTBQL಺ʹ͋Δ  

  16. <?xml version="1.0" encoding="utf-8"?> <device name="Android"> <item name="none">0</item> <item name="screen.on">82.75</item> <item

    name="screen.full">201.16</item> <item name="camera.avg">804.85</item> <item name="camera.flashlight">546.37</item> <item name="bluetooth.active">51.55</item> <item name="bluetooth.on">0.79</item> <item name="wifi.on">3.5</item> <item name="wifi.active">73.24</item> <item name=“wifi.scan">75.48</item> ɾɾɾ <item name="gps.on">76.23</item> <item name="radio.active">185.19</item> <item name="radio.scanning">99.2</item> <array name="radio.on"> <value>4.8</value> <value>1.11</value> </array> <array name=“cpu.speeds"> ɾɾɾ </array> <item name="battery.capacity">2300</item> ɾɾɾ </device> ˞୯Ґ͸N"  
  17. ফඅిྗͷ໨҆Λ೺Ѳɾཧղ /'$ δϟΠϩ Ճ଎౓ #MVFUPPUI 8J'J ϥδΦ ి࿩ Χϝϥ (14

    ࣓ؾ ϥΠτ όοςϦʔԹ౓ ϚΠΫ λονύωϧ ϑΟϯΨʔϓϦϯτ ৺ഥ র౓ ؾԹ ࣪౓ ؾѹ ࠷ۙͷϋʔυ΢ΣΞػೳ w࠷ۙͷσόΠεͷϋʔυ΢ΣΞػೳ͸๛෋ w༷ʑͳػೳͷෳ߹ʹΑͬͯిྗ͸ফඅ͞ΕΔ w֤ʑͲͷఔ౓ͷిྲྀফඅ͔Λ೺Ѳ͓ͯ͘͠ wύϑΥʔϚϯεΛ࠷దԽ͢Δࡍͷେہ؍͕਎ʹͭ͘  
  18. EVNQTZTCBUUFSZTUBUT ి஑ͷ৭ʑͳ৘ใΛݟΔ͜ͱ͕Ͱ͖Δ ͘͢͝ศར ຖ೔ோΊ͍ͯͯ΋๞͖ͳ͍Ϩϕϧ  

  19. EVNQTZTCBUUFSZTUBUTDIBSHFE  Discharge step durations: #0: +9m14s274ms to 68 (screen-off,

    power-save-off, device-idle-off) #1: +7m5s659ms to 69 (screen-off, power-save-off, device-idle-off) #2: +2m0s241ms to 70 (power-save-off, device-idle-off) #3: +2m8s447ms to 71 (power-save-off, device-idle-off) #4: +1m39s394ms to 72 (power-save-off, device-idle-off) #5: +5m10s71ms to 73 (power-save-off) #6: +6m27s339ms to 74 (screen-off, power-save-off, device-idle-off) #7: +5m54s489ms to 75 (screen-off, power-save-off, device-idle-off) ຖͷόοςϦʔফඅͷਪҠɾঢ়ଶ಺༁  
  20. EVNQTZTCBUUFSZTUBUTDIBSHFE  Current daily steps: Discharge total time: 8h 40m

    19s 100ms (from 145 steps) Discharge screen off time: 12h 16m 59s 600ms (from 60 steps) Discharge screen off device idle time: 1d 0h 43m 42s 0ms (from 8 steps) Discharge screen on time: 3h 19m 41s 900ms (from 40 steps) Charge total time: 11h 43m 35s 200ms (from 104 steps) Charge screen off time: 2h 23m 33s 800ms (from 94 steps) Charge screen on time: 1h 29m 11s 200ms (from 3 steps) Daily from 2016-02-15-02-42-48 to 2016-02-16-01-08-18: Discharge total time: 8h 36m 37s 700ms (from 187 steps) Discharge screen off time: 17h 2m 15s 400ms (from 53 steps) Discharge screen off device idle time: 19h 16m 15s 600ms (from 12 steps) Discharge screen on time: 3h 9m 45s 600ms (from 64 steps) Charge total time: 8h 35m 34s 0ms (from 166 steps) Charge screen off time: 2h 0m 41s 400ms (from 119 steps) Charge screen on time: 19h 57m 59s 300ms (from 38 steps) ೔ʑͷαϚϦʔ  
  21. EVNQTZTCBUUFSZTUBUTDIBSHFE  Statistics since last charge: System starts: 0, currently

    on battery: false Time on battery: 1h 42m 37s 902ms (89.5%) realtime, 1h 42m 37s 902ms (89.5%) uptime Time on battery screen off: 1h 30m 51s 255ms (79.2%) realtime, 1h 30m 51s 255ms (79.2%) uptime Total run time: 1h 54m 41s 669ms realtime, 1h 54m 41s 669ms uptime Charge time remaining: 1h 2m 45s 231ms Start clock time: 2016-02-16-16-40-35 Screen on: 11m 46s 647ms (11.5%) 10x, Interactive: 11m 41s 48ms (11.4%) Screen brightnesses: dark 11m 46s 647ms (100.0%) Device idling: 2m 55s 41ms (2.8%) 1x Idle mode time: 2m 55s 41ms (2.8%) 1x Connectivity changes: 5 ɾɾɾ લճͷνϟʔδ͔ΒͷαϚϦʔ  
  22. EVNQTZTCBUUFSZTUBUTDIBSHFE  Estimated power use (mAh): Capacity: 2300, Computed drain:

    493, actual drain: 506-529 Wifi: 135 ( cpu=0.0284 wifi=135 ) Bluetooth: 68.9 ( cpu=64.3 wake=4.63 ) Uid 0: 55.0 ( cpu=19.9 wake=20.9 radio=14.2 wifi=0.00000287 ) Uid 1000: 34.6 ( cpu=33.2 wake=0.0925 radio=0.0325 gps=1.05 sensor=0.208 ) Uid u0a11: 32.8 ( cpu=12.3 wake=0.390 radio=19.7 wifi=0.0975 sensor=0.295 ) Uid u0a134: 32.5 ( cpu=32.5 ) Uid u0a71: 22.2 ( cpu=9.39 wake=0.0718 radio=12.8 wifi=0.00000296 ) Screen: 20.2 Uid u0a81: 18.9 ( cpu=5.72 radio=13.2 sensor=0.00871 ) ݱঢ়ͷిྗফඅͷ༧૝  
  23. EVNQTZTCBUUFSZTUBUTDIBSHFE  u0a119: Mobile network: 32.09KB received, 39.30KB sent (packets

    268 received, 289 sent) ɾɾɾ Foreground activities: 9s 84ms realtime (2 times) Foreground for: 35s 258ms Active for: 2h 2m 19s 713ms Total cpu time: u=7s 580ms s=3s 660ms p=0.769mAh Proc com.facebook.orca: CPU: 7s 70ms usr + 3s 340ms krn ; 3s 570ms fg 2 starts ɾɾɾ ΞϓϦ͝ͱʢ'BDFCPPL.FTTFOHFSͷྫʣ ࣌ؒ෼ඵͷؒʹϑΥΞάϥ΢ϯυঢ়ଶ͸໿ඵ $16Λফඅ͍ͯͨ͠ͷ͸ɼඵఔ౓  
  24. ݟΔͷ ΊΜͲ͍͘͞  

  25. #BUUFSZ)JTUPSJBO  

  26. #BUUFSZ)JTUPSJBO όοςϦʔফඅͷՄࢹԽπʔϧ ࠷৽൛͸ɼ(PMBOH͕ඞཁ μ΢ϯϩʔυ HPHFUVHJUIVCDPNHPPHMFCBUUFSZIJTUPSJBO DE(01"5)TSDHJUIVCDPNHPPHMFCBUUFSZIJTUPSJBO ίϯύΠϧ CBTITFUVQTI αʔόʔىಈσϑΥϧτ͸ϙʔτ HPSVODNECBUUFSZIJTUPSJBOCBUUFSZIJTUPSJBOHP

    ౷ܭ৘ใऔಘ BECCVHSFQPSUIPHFUYU IUUQMPDBMIPTUʹΞΫηεͯ͠ɼऔಘͨ͠౷ܭ৘ใ IPHFUYU ΛΞοϓϩʔυ͢Ε͹ݟΕΔ  
  27. όοΫάϥ΢ϯυͰͷফඅ "OESPJEͷಛ௃ͱͯ͠ ফඅిྗͷׂ͸ ΞΠυϧ࣌ʹফඅ͞ΕΔ܏޲ Β͍͠  όοΫάϥ΢ϯυͰͷফඅΛ ݮΒ͢͜ͱ͕େࣄ  

  28. +PC4DIFEVMFS ి஑ʹ༏͍͠δϣϒ࣮ߦ"1* "OESPJE͔Β  ి஑ʹ༏͍͠εέδϡʔϦϯά࣮ߦΛߦ͏"1* λεΫͷ#BDL0GG΍࣮ߦ৚݅ͳͲॊೈͳࢦఆ͕Մೳ ଈ࣌ੑͷͳ͍όοΫάϥ΢ϯυॲཧʹ࠷ద ࢖͑ΔͳΒ࢖Θͳ͍ख͸ͳ͍ JobInfo uploadTask

    = new JobInfo.Builder(mJobId, mServiceComponent)
 .setRequiredNetworkCapabilities(JobInfo.NETWORK_TYPE_UNMETERED)
 .build();
 
 JobScheduler jobScheduler =
 (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
 jobScheduler.schedule(uploadTask);
  
  29. ($./FUXPSL.BOBHFS +PC4DIFEVMFSͷ୅ΘΓʹ࢖͑Δδϣϒ"1* +PC4DIFEVMFS͸Ҏ߱͜Ε͸͔Βར༻Մ (PPHMF1MBZ4FSWJDFTඞਢ ($.ϥΠϒϥϦʹґଘ͢Δ ͨͩ͠($.ͷػೳΛ࢖͍ͬͯͳ͍ΞϓϦͰ΋࢖͑Δ mGcmNetworkManager = GcmNetworkManager.getInstance(this); OneoffTask

    task = new OneoffTask.Builder() .setService(MyTaskService.class) .setTag(TASK_TAG_WIFI) .setExecutionWindow(0L, 3600L) .setRequiredNetwork(Task.NETWORK_STATE_UNMETERED) .build(); mGcmNetworkManager.schedule(task);  
  30. IUUQEFWFMPQFSBOESPJEDPNJOUMKBUSBJOJOHNPOJUPSJOHEFWJDFTUBUFEP[FTUBOECZIUNM %P[F'SBNFXPSL ফඅిྗ࡟ݮͷ࢓૊Έ "OESPJE͔Βʣ  ໌ࣔతͳλΠϜεϩοτΛׂΓ౰ͯͯόοΫάϥ΢ϯυ ͰͷڍಈΛ੍ݶ͢Δ͜ͱͰফඅిྗΛ࡟ݮ͢Δ  

  31. IUUQEFWFMPQFSBOESPJEDPNJOUMKBUSBJOJOHNPOJUPSJOHEFWJDFTUBUFEP[FTUBOECZIUNM %P[F'SBNFXPSL ফඅిྗ࡟ݮͷ࢓૊Έ "OESPJE͔Βʣ  ໌ࣔతͳλΠϜεϩοτΛׂΓ౰ͯͯόοΫάϥ΢ϯυ ͰͷڍಈΛ੍ݶ͢Δ͜ͱͰফඅిྗΛ࡟ݮ͢Δ %P[Fʹ͍ͭͯ͸ɼ த੢ྑ໌ !DIVO@SZP

    ͞Μͷ ࡢ೔ͷεϥΠυ͕Θ͔Γ΍͍͢ͷͰ ͦΕΛݟΔͷ͕͍͍ͱࢥ͍·͢ʂ "OESPJEͷলిྗʹ͍ͭͯߟ͑Δ IUUQTHPPHMZY#:0)  
  32. *%-& ˞*%-&த͸༷ʑͳ΋ͷ͕ࢭ·Δ %P[Fͷঢ়ଶ֓ཁ "$5*7& */"$5*7& *%-&@1&/%*/( *%-&@."*/5&/"/$& ˞ॲཧՄೳͳ࿮ Ұఆ࣌ؒܦաʢ෼ʣ Ұఆ࣌ؒܦաʢ෼ʣ

    Ұఆ࣌ؒܦաঃʑʹ௕͘ͳΔ ʢ࣌ؒɼ࣌ؒʜ࣌ؒʣ ը໘Λ͚ͭͨ ʜͳͲ ը໘Λফͨ͠ "MBSN.BOBHFS ωοτϫʔΫ 4ZOD"EBQUFS +PC4DIFEVMFS FUD  
  33. ঢ়ଶͷ֬ೝ $ dumpsys deviceidle Settings: inactive_to=+30m0s0ms sensing_to=+4m0s0ms locating_to=+30s0ms location_accuracy=20.0m motion_inactive_to=+10m0s0ms

    idle_after_inactive_to=+30m0s0ms idle_pending_to=+5m0s0ms max_idle_pending_to=+10m0s0ms idle_pending_factor=2.0 idle_to=+60m0s0ms max_idle_to=+6h0m0s0ms idle_factor=2.0 min_time_to_alarm=+60m0s0ms max_temp_app_whitelist_duration=+5m0s0ms mms_temp_app_whitelist_duration=+60s0ms sms_temp_app_whitelist_duration=+20s0ms Whitelist (except idle) system apps: com.android.providers.downloads com.android.vending com.google.android.gms Whitelist system apps: com.google.android.gms Whitelist user apps: foo.bar.baz Whitelist (except idle) all app ids: 10008 10011 10020 10150 Whitelist all app ids: 10011 10150 mEnabled=true mForceIdle=false mSigMotionSensor={Sensor name="Significant Motion Detector", vendor="QTI", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.3999939, minDelay=-1} mCurDisplay=Display id 0: DisplayInfo{"಺ଂεΫϦʔ ϯ", uniqueId "local:0", app 1080 x 1776, real 1080 x 1920, largest app 1794 x 1704, smallest app 1080 x 1008, mode 1, defaultMode 1, modes [{id=1, width=1080, height=1920, fps=60.0}], rotation 0, density 480 (442.451 x 443.345) dpi, layerStack 0, appVsyncOff 7500000, presDeadline 12666667, type BUILT_IN, state OFF, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}, DisplayMetrics{density=3.0, width=1080, height=1776, scaledDensity=3.0, xdpi=442.451, ydpi=443.345}, isValid=true mScreenOn=false mCharging=false mSigMotionActive=false mSensing=false mNotMoving=false mLocating=false mHaveGps=true mLocated=false mState=INACTIVE mInactiveTimeout=+30m0s0ms mNextAlarmTime=+20m51s734ms  
  34. ڧ੍ঢ়ଶભҠ $ dumpsys deviceidle step Stepped to: ACTIVE shell@hammerhead:/ $

    dumpsys deviceidle step Stepped to: IDLE_PENDING shell@hammerhead:/ $ dumpsys deviceidle step Stepped to: SENSING shell@hammerhead:/ $ dumpsys deviceidle step Stepped to: LOCATING shell@hammerhead:/ $ dumpsys deviceidle step Stepped to: IDLE shell@hammerhead:/ $ dumpsys deviceidle step Stepped to: IDLE_MAINTENANCE  
  35. ڧ੍ঢ়ଶભҠ $ dumpsys deviceidle step Stepped to: ACTIVE shell@hammerhead:/ $

    dumpsys deviceidle step Stepped to: IDLE_PENDING shell@hammerhead:/ $ dumpsys deviceidle step Stepped to: SENSING shell@hammerhead:/ $ dumpsys deviceidle step Stepped to: LOCATING shell@hammerhead:/ $ dumpsys deviceidle step Stepped to: IDLE shell@hammerhead:/ $ dumpsys deviceidle step Stepped to: IDLE_MAINTENANCE %P[Fʹ͍ͭͯ͸ɼ த੢ྑ໌ !DIVO@SZP ͞Μͷ ࡢ೔ͷεϥΠυ͕Θ͔Γ΍͍͢ͷͰ ͦΕΛݟΔͷ͕͍͍ͱࢥ͍·͢ʂ "OESPJEͷলిྗʹ͍ͭͯߟ͑Δ IUUQTHPPHMZY#:0)  
  36. 6*ʹ͍ͭͯ  

  37. ଟ͘ͷύϑΥʔϚϯεࢦඪ͸ 6*ʹؼ݁͠ɼݦࡏԽ͢Δ  

  38. ࣌ؒͱར༻ऀͷ൓Ԡͷࢦඪ ஗Ԇ࣌ؒ ར༻ऀͷ൓Ԡ NT *OTUBOU NT 'FFMTMVHHJTI NTT .BDIJOFJTXPSLJOH T

    .FOUBMDPOUFYUTXJUDI T *`MMDPNFCBDLMBUFS #SFBLJOHUIFNT5JNFUP(MBTT.PCJMF#BSSJFSIUUQTXXXZPVUVCFDPNXBUDI W*MTX(G504. NTҎԼΛอ͍ͬͯΕ͹ɼར༻ऀʹ଎͍ͱײͤ͡͞Δ ඵҎԼΛอ͍ͬͯΕ͹ɼར༻ऀͷूதྗΛอͯΔ  
  39. ϨϯμϦϯάͷྺ࢙ (JOHFS#SFBEҎલ )POFZDPNC *$4 +FMMZ#FBO $16࢖༻ ϋʔυ΢ΣΞΞΫηϥϨʔγϣϯͷ ௥Ճ ϋʔυ΢ΣΞΞΫηϥϨʔγϣϯ͕ σϑΥϧτʹ

    74:/$ʹΑΔϑϨʔϜ࠷దԽ  
  40. ϨϯμϦϯάͷྺ࢙ (JOHFS#SFBEҎલ )POFZDPNC *$4 +FMMZ#FBO $16࢖༻ ϋʔυ΢ΣΞΞΫηϥϨʔγϣϯͷ ௥Ճ ϋʔυ΢ΣΞΞΫηϥϨʔγϣϯ͕ σϑΥϧτʹ

    74:/$ʹΑΔϑϨʔϜ࠷దԽ ͜ͷ͋ͨΓ͸ ֓ͶGQTͰඳը  
  41. +BOL 4LJQQFEGSBNFT5IFBQQMJDBUJPONBZ CFEPJOHUPPNVDIXPSLPOJUTNBJOUISFBE ࠷ۙͷଟ͘ͷσόΠεͰ͸GQTͰඳը͞ΕΔͱࢥͬͯΑ͍ ͭ·ΓNTʹ͖ͭճ ϨϯμϦϯά͕ؒʹ߹Θͳ͚Ε͹ɼ+BOL͕ൃੜ͢Δ +BOL͕ൃੜ͢ΔͱɼϑϨʔϜ͕εΩοϓ͞ΕΔ ଟ͘ͷ৔߹ɼΞχϝʔγϣϯͷলུ΍δϟϯϓͱ͍͏ܗͰ ར༻ऀʹݟ͑ΔʢϦετ͕Χλͭ͘ͳͲʣ +BOLΛආ͚ΔʢݮΒ͢ʣ͜ͱ͕େࣄ

     
  42. 7JFXͷϨϯμϦϯά .FBTVSF ஈ֊ -BZPVU %SBX  

  43. 7JFXͷϨϯμϦϯά .FBTVSF )JFSBSDIZ7JFXFSͰ ՄࢹԽՄೳ -BZPVU %SBX  

  44. ωετʹΑΔ3FNFBTVSF w%SBXʹ࠷΋͕͔͔࣌ؒΔঢ়ଶ͕Ұൠత w.FBTVSF͕஗͍৔߹͸ରࡦ͢ΔՁ஋͋Γ wݪҼ͸େ఍ϨΠΞ΢τͷωετ ˞3FMBUJWF-BZPVU΍-JOFBS-BZPVUΛॏͶΔͱ.FBTVSF ͕ෳ਺ճ࣮ߦ͞ΕΔ͜ͱʹΑΔ .FBTVSFNT -BZPVUNT %SBXNT .FBTVSFNT

    -BZPVUNT %SBXNT ྫʣ ωετͨ͠ঢ়ଶ վળޙ  
  45. 0WFSESBXͷճආ w%SBX͕஗͍৔߹͸0WFSESBXΛٙ͏ͷΑ͍ʢΑ͔ͬͨʣ 0WFSESBXଞͷ7JFX͕ඳըͨ͠ྖҬΛผͷ7JFX͕͞Βʹඳը͢Δ͜ͱ w։ൃऀ޲͚Φϓγϣϯ(16ΦʔόʔυϩʔΛσόοά w੺ͬΆ͍ը໘͔Β੨͘͢ΔͷΛؤுΕ͹ഒ͘Β͍͸଎͘Ͱ͖Δҹ৅ʢݸਓతʹ͸ʣ w,JULBUҎ߱Ͱ͸ɼ୯७ͳ0WFSESBX͸ࣗಈతʹແࢹ͢ΔΑ͏ʹͳͬͨͷͰɼ ͦΕ΄Ͳਆܦ࣭ʹͳΒͳͯ͘΋͍͍ w)JFSBSDIZ7JFXFSͰ14%ϑΝΠϧʹग़ྗͯ֬͠ೝ͢Δํ๏΋͓͢͢Ί IUUQEFWFMPQFSBOESPJEDPNJOUMKBUPPMTQFSGPSNBODFEFCVHHQVPWFSESBXJOEFYIUNM 

    
  46. (16ͷϓϩϑΝΠϧ w։ൃऀ޲͚Φϓγϣϯ(16ϨϯμϦϯάͷϓϩϑΟʔϧ࡞੒ wը໘Լ෦ʹόʔ͕දࣔ NTͷϘʔμʔ ֓Ͷ͜ΕΑΓԼʹऩ·͍ͬͯΕ͹ ໰୊ͳ͠ ৭ આ໌ ੨ 7JFXͷੜ੒ɽ7JFXͷݸ਺΍PO%SBXͷॲཧʹґଘ

    ࢵ ඳը͢ΔϦιʔεͷసૹ ᒵ (16ͷॲཧΛ$16͕଴͍ͬͯΔ࣌ؒ ྘ 74:/$ͷ஗Ԇ ੺ (16ʹΑΔඳը࣮ߦ  
  47. EVNQTZTHGYJOGP  wඳըঢ়گΛग़ྗ͢Δ w.BSTINBMMPX͔Βɼ+BOLͷ৘ใ͕ग़ΔΑ͏ʹͳͬͨͷͰΦεεϝ $ dumpsys gfxinfo com.android.chrome Applications Graphics

    Acceleration Info: Uptime: 597531242 Realtime: 711924124 ** Graphics info for pid 20066 [com.android.chrome] ** Stats since: 285971726390ns Total frames rendered: 105823 Janky frames: 7544 (7.13%) 90th percentile: 12ms 95th percentile: 20ms 99th percentile: 61ms Number Missed Vsync: 3695 Number High input latency: 107 Number Slow UI thread: 5179 Number Slow bitmap uploads: 180 Number Slow issue draw commands: 1409  
  48. EVNQTZTHGYJOGP  wGSBNFTUBUTΦϓγϣϯΛ͚ͭΔ͜ͱͰ$47ʹग़ͤΔ ԿΒ͔ͷใࠂΛ͍ͨ͠ਓʹΑ͛͞ $ dumpsys gfxinfo com.android.chrome frmaestats ɽɽɽ

    ---PROFILEDATA--- Flags,IntendedVsync,Vsync,OldestInputEvent,NewestInputEvent,HandleInputStart,AnimationStart,PerformTrave rsalsStart,DrawStart,SyncQueued,SyncStart,IssueDrawCommandsStart,SwapBuffers,FrameCompleted, 0,595038370692748,595038370692748,9223372036854775807,0,595038370998175,595038371018280,595038371255675, 595038371318227,595038371326092,595038371355467,595038371667707,595038373518852,595038373844217, 0,595038387481465,595038387481465,9223372036854775807,0,595038387827706,595038387848696,595038388113904, 595038388181821,595038388189216,595038388236925,595038388494320,595038390478436,595038390783332, 0,595038404272433,595038404272433,9223372036854775807,0,595038404522185,595038404542810,595038404809529, 595038404879217,595038404887081,595038404917290,595038405425154,595038407567081,595038407916821, 0,595233182608257,595233199274924,9223372036854775807,0,595233201683778,595233201726121,595233201728153, 595233214312788,595233220404767,595233220450288,595233220741903,595233290040757,595233290859559, 1,595235671142934,595236071142942,9223372036854775807,0,595236084183776,595236084205599,595236106287943, 595236126082787,595236126169453,595236126566641,595236126672682,595236129216953,595236130180860, 1,595236090534104,595236323867442,9223372036854775807,0,595236326619401,595236326636120,595236326638047, 595236330241589,595236330841797,595236330879245,595236331001693,595236332922995,595236333575912, 0,595237933959311,595237983959312,9223372036854775807,0,595237992574870,595237992595599,595237992676172, 595238031718463,595238032300963,595238032443463,595238032605442,595238042187942,595238043794505, 0,595494486956219,595494753622891,9223372036854775807,0,595494765734667,595494765754927,595494765826177, 595494765886802,595494767907948,595494767962115,595494768232479,595494769174094,595494777457427, 0,595494788518428,595494805185095,9223372036854775807,0,595494815020136,595494815039355,595494815142480, 595494815200240,595494815479407,595494815512375,595494815607375,595494843050657,595494847498313, 0,595498141914317,595498141914317,9223372036854775807,0,595498142255708,595498142269979,595498142339406,  
  49. ͦͷଞ 1IPUPCZ#SJBO5VSOFSr.FNPSZ$$#: 1IPUPCZBMMJTPO@EDrOFUXPSL$$#: 1IPUPCZ$ISJT.D$MBOBIBOrDQV$$#: ௨৴ ϝϞϦ ϓϩηοα  

  50. ௨৴ͷ࠷దԽ ຊ֨తʹऔΓ૊Ήʹ͸͔ͳΓ೉͍͠ҹ৅ ೉͍͠ཧ༝ɿ wηϧϥʔ ( ( ͱ8J'JͷϨΠςϯγʔ΍ফඅిྗͷҧ͍ w௨৴ϓϩτίϧͷҧ͍ wαʔόʔʹ΋ґଘ͢ΔʜͳͲ ݸਓతͳ͓खܰΞϓϩʔνͱͯ͠͸ʜ

    wΑ͍௨৴ϥΠϒϥϦΩϟογϡϥΠϒϥϦΛ࢖͏ wΑ͍ϓϩτίϧΛ࢖͏ wΑ͍αʔόʔʢϓϩμΫτʣΛ࢖͏ wͦͷ্Ͱଌఆ͠ɼ໰୊͕͋Ε͹վળΛߟ͑Δ  
  51. "55"30 "QQMJDBUJPO3FTPVSDF0QUJNJ[FS "55੡ͷ௨৴࠷దԽπʔϧ SPPUFEཁ ͔ͳΓΦεεϝ ͜ΕͰάϦʔϯʹͳ͍ͬͯͳ͍ՕॴΛݟΕ͹͍͍ͷͰ؆୯ IUUQTEFWFMPQFSBUUDPNBQQMJDBUJPOSFTPVSDFPQUJNJ[FS  

  52. "30ͷධՁ߲໨ 'JMF%PXOMPBE5FYU'JMF$PNQSFTTJPO 'JMF%PXOMPBE%VQMJDBUF$POUFOU 'JMF%PXOMPBE$BDIF$POUSPM 'JMF%PXOMPBE$POUFOU&YQJSBUJPO 'JMF%PXOMPBE$PNCJOF+4BOE$443FRVFTUT 'JMF%PXOMPBE3FTJ[F-BSHF*NBHFTGPS.PCJMF 'JMF%PXOMPBE.JOJGZ$44 +4 +40/BOE)5.-

    'JMF%PXOMPBE6TF$444QSJUFTGPS*NBHFT $POOFDUJPOT$POOFDUJPO0QFOJOH $POOFDUJPOT6OOFDFTTBSZ$POOFDUJPOT .VMUJQMF4JNVMUBOFPVT$POOFDUJPOT $POOFDUJPOT*OF⒏DJFOU$POOFDUJPOT1FSJPEJD 5SBOTGFST $POOFDUJPOT*OF⒏DJFOU$POOFDUJPOT4DSFFO3PUBUJPO $POOFDUJPOT*OF⒏DJFOU$POOFDUJPOT$POOFDUJPO $MPTJOH1SPCMFNT $POOFDUJPOT )5514UBUVT3FTQPOTF$PEFT $POOFDUJPOT )5514UBUVT3FTQPOTF$PEFT $POOFDUJPOTSE1BSUZ4DSJQUT )5.-"TZODISPOPVT-PBEPG+BWB4DSJQUJO)5.- )5.-)5516TBHF )5.-'JMF0SEFS )5.-&NQUZ4PVSDFBOE-JOL"UUSJCVUFT )5.-'-"4) )5.-EJTQMBZOPOFJO$44 0UIFS"DDFTTJOH1FSJQIFSBM"QQMJDBUJPOT ༷ʑͳ௨৴ͷ౷ܭͷऩूɾՄࢹԽ΍ ౷ܭͱରԠͨ͠ૢ࡞ͷ࿥ը΋Մೳ  
  53. ϝϞϦͷ࠷దԽ ͜Ε΋௨৴ͱಉ༷ʹຊ֨తʹऔΓ૊Ήʹ͸ ͔ͳΓ೉͍͠ ೉͍͠ཧ༝ɿ w($ͷ࢓૊Έͷࠩҟ 458ฒྻ($"35$PNQBDUJOH($  wϝϞϦྖҬͷछྨͷҧ͍ wσόΠεɾόʔδϣϯʹΑΔϝϞϦ༰ྔͷҧ͍ͳͲ ݸਓతͳ͓खܰΞϓϩʔνͱͯ͠͸ʜ

    w($ʹΑΔQBVTFͦͷ΋ͷ͸ ͋Μ·Γ ݟͳ͍ 6*͕े෼ʹඳըͰ͖͍ͯΕ͹͍͍ͨͯେৎ෉ wϝϞϦϦʔΫ͚ͩ͸ͪΌΜͱݟ͓ͯ͘  
  54. EVNQTZTNFNJOGP Applications Memory Usage (kB): Uptime: 616002857 Realtime: 730459424 Total

    PSS by process: 201166 kB: com.android.systemui (pid 937 / activities) 114038 kB: system (pid 788) ɾɾɾɾ Total PSS by OOM adjustment: 66898 kB: Native 23130 kB: surfaceflinger (pid 195) 9378 kB: mediaserver (pid 202) ɾɾɾ 114038 kB: System 114038 kB: system (pid 788) ɾɾɾ Total PSS by category: 505426 kB: Native 331750 kB: Dalvik 134928 kB: EGL mtrack ɾɾɾ Total RAM: 1899508 kB (status normal) Free RAM: 597234 kB (293778 cached pss + 245048 cached kernel + 58408 free) Used RAM: 1299589 kB (1077869 used pss + 221720 kernel) Lost RAM: 2685 kB Tuning: 192 (large 512), oom 184320 kB, restore limit 61440 kB (high-end-gfx)Uid u0a71: 22.2 ( cpu=9.39 wake=0.0718 radio=12.8 wifi=0.00000296 ) Screen: 20.2 ɾɾɾ σόΠεશମͷϝϞϦ࢖༻ྔͷαϚϦ  
  55. EVNQTZTNFNJOGP<QJE> ** MEMINFO in pid 1551 [com.android.chrome] ** Pss Private

    Private Swapped Heap Heap Heap Total Dirty Clean Dirty Size Alloc Free ------ ------ ------ ------ ------ ------ ------ Native Heap 70976 70612 0 0 96896 82824 14071 Dalvik Heap 6046 5944 0 0 25556 19628 5928 Dalvik Other 1276 1276 0 0 Stack 484 484 0 0 Ashmem 1008 68 0 0 Other dev 9 0 8 0 .so mmap 514 160 0 0 .apk mmap 4099 1548 2204 0 .ttf mmap 0 0 0 0 .dex mmap 423 4 408 0 .oat mmap 510 0 8 0 .art mmap 1292 1092 0 0 Other mmap 10 8 0 0 Unknown 281 280 0 0 TOTAL 86928 81476 2628 0 122452 102452 19999 ࢦఆͨ͠ϓϩηε*%ͷϝϞϦ࢖༻ঢ়گ  
  56. EVNQTZTQSPDTUBUT<QBDLBHF> AGGREGATED OVER LAST 3 HOURS: System memory usage: SOff/Norm:

    1 samples: Cached: 133MB min, 133MB avg, 133MB max Free: 44MB min, 44MB avg, 44MB max ZRam: 0.00 min, 0.00 avg, 0.00 max Kernel: 220MB min, 220MB avg, 220MB max Native: 65MB min, 65MB avg, 65MB max ɾɾɾ Per-Package Stats: * com.android.chrome / u0a37 / v256409501: * com.android.chrome / u0a37 / v256409501: TOTAL: 19% (94MB-131MB-144MB/90MB-126MB-137MB over 18) Top: 19% (94MB-131MB-144MB/90MB-126MB-137MB over 18) Service: 0.03% (Last Act): 3.5% (67MB-83MB-91MB/64MB-80MB-87MB over 4) (Cached): 78% (65MB-93MB-111MB/62MB-90MB-107MB over 19) ɾɾɾ ࢦఆͨ͠ΞϓϦͷ ௚ۙ࣌ؒɼ௚ۙ࣌ؒͷϝϞϦ࢖༻ঢ়گ౷ܭ ʢεΫϦʔϯΦϯ࣌ɼΦϑ࣌ͳͲෳ਺ͷ࣠Ͱʣ  
  57. ϝϞϦϦʔΫͷݕग़ )FBQEVNQ  "MMPDBUJPO5SBDLFS  .FNPSZ"OBMZ[FS5PPM ."5 ͳͲ͕Ԧಓ  

  58. ݸਓతͳΦεεϝ͸-FBL$BOBSZ IUUQTDPSOFSTRVBSFVQDPNMFBLDBOBSZIUNM w4RVBSF੡IUUQTHJUIVCDPNTRVBSFMFBLDBOBSZ w͔ͳΓखܰʹߴਫ਼౓ͳϝϞϦϦʔΫݕग़͕Մೳ wΞϓϦʹͪΐͬͱͨ͠ܭଌίʔυΛ࢓ࠐΉඞཁ͕͋Δ ίʔυΛ࢓ࠐΜͰ΋͍͍ঢ়گͳΒ࢖Θͳ͍ख͸ͳ͍  

  59. PO5SJN.FNPSZ ˞ࢲ͸࢖Θͳ͍೿Ͱ͢ ࢖͍ͬͯΔਓ͍·͔͢ʁ  

  60. $16࠷దԽ ͱݴͬͯ΋ʜ w ۙ೥ͷ"3.ϕʔεͷνοϓηοτͰ͸ॲཧ͢ΔλεΫ ʹΑׂͬͯΓ౰ͯΔ$16Λม͑ΔܗʢCJH-*55-&Ξʔ ΩςΫνϟʔʣ͕ओྲྀɽΫϩοΫप೾਺΋࠷దԽ͞ΕΔ w ΋͸΍ҰൠతͳΞϓϦέʔγϣϯͰ͸$16ͷ࠷దԽΛ ։ൃऀ͕ҙࣝ͠ͳ͘ͱ΋ࡁΉΑ͏ʹͳ͖͍ͬͯͯΔ࣌୅ ݸਓతʹ͸ΞϓϦ։ൃऀͱͯ͠͸

    ओʹ"/3΍KBOLΛ๷͙໨తͰΞϓϦͷϓϩηε΍ εϨου͕ͲͷΑ͏ʹ$16Λར༻͍ͯ͠Δ͔Λ ೺Ѳ͓͚ͯ͠͹Α͍ͱࢥΘΕΔ  
  61. EVNQTZTDQVJOGP adb shell dumpsys cpuinfo Load: 10.04 / 9.82 /

    10.0 CPU usage from 21308ms to 470ms ago with 99% awake: 38% 12248/com.quicinc.trepn: 29% user + 8.4% kernel / faults: 92026 minor 18% 195/surfaceflinger: 12% user + 6.6% kernel 8.3% 1891/com.google.android.gms.persistent: 7.7% user + 0.5% kernel / faults: 2353 minor 3.8% 788/system_server: 2.1% user + 1.7% kernel / faults: 59 minor ɾɾɾ 47% TOTAL: 32% user + 13% kernel + 0.9% iowait + 0.1% softirq σόΠεશମͷ$16࢖༻ঢ়گ ௚ۙ෼෼෼ͷϩʔυঢ়گ ௚ۙඵͷ֤ϓϩηε͝ͱͷར༻ঢ়گ ˞ಉ༷ͷ͜ͱ͸։ൃऀ޲͚Φϓγϣϯ$16࢖༻ঢ়گΛදࣔͰ΋Մ  
  62. 4ZTUSBDF $16ར༻ঢ়گΛՄࢹԽ͢ΔԦಓͷπʔϧ +BOL΋Θ͔Γ΍͍͢ IUUQEFWFMPQFSBOESPJEDPNJOUMKBUPPMTEFCVHHJOHTZTUSBDFIUNM  

  63. 5SFQO1PXFS1SPpMFS w 2VBMDPNN੡ͷϓϩϑΝΠϦϯάπʔϧ IUUQTEFWFMPQFSRVBMDPNNDPNTPGUXBSFUSFQOQPXFSQSPpMFS  w 2VBMDPNNϓϩηοαͷσόΠεͰ͔͠ಈ࡞͠ͳ͍ ͕ɼର৅σόΠεͳΒ͔ͳΓৄ͍͠৘ใΛखܰʹಘΒ ΕΔ w

    $16΍(16ͷ৘ใʹؔͯ͠͸ݸਓతʹ͓͢͢Ί w ϝϞϦ΍௨৴ʢ#MVFUPPUI΋ʣ΋ՄࢹԽՄೳ  
  64. ࠷ޙʹ  

  65. ඇػೳΛؤுΖ͏ ඇػೳ͸೔ӄऀɽɽɽ͕ͩ ඇػೳΛؤுΕΔ͔Ͳ͏͔͕σϕϩούʔͱͯ͠ͷ Ձ஋Λେ͖͘ࠨӈ͢Δʢؾ͕͢Δʣ  ෳ਺ͷ؍఺ͰݟΔ͜ͱ͕େࣄ ϞόΠϧσόΠεͱ͸ͦ͏͍͏΋ͷ ਪଌ͸͋·ΓΞςʹͳΒͳ͍ɽՄࢹԽɼܭଌେࣄ ੵΈॏͶେࣄ ෦԰ͷ૟আͱҰॹ

    ຖ೔গͣͭ͠ؾΛ͚͍ͭͯΕ͹៉ྷͳ·· গͣͭ͠Ͱ΋ܧଓ͢ΔʢܧଓͰ͖Δ͜ͱΛ͢Δʣ  
  66. ͋Γ͕ͱ͏͍͟͝·ͨ͠ ๻͕৺͔Β௒Ұྲྀͱࢥ͏ਓ͸Ͳ͏ੜ͖ͨͷ͔ɻ ΈΜͳɺখརޱͳ͜ͱͳͲͤͣɺಷ͍͘͜͞ͱΛͻͨΉ͖ʹ΍Γɺ όΧͩͱ͍ΘΕͨ࣌ظ͕͋ͬͨɻ ɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹɹ੢ᖒ५Ұʢ൒ಋମ޻ֶऀʣ