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

PWA 품은 안드로이드 웹뷰 성능 개선기

PWA 품은 안드로이드 웹뷰 성능 개선기

2019 드로이드 나이츠(Droid Knights)에서 발표한 자료입니다.

Jinny You

April 05, 2019
Tweet

More Decks by Jinny You

Other Decks in Programming

Transcript

  1. 18"ۆ 18"ীࢲ૑ਗೞחநद ೐ܻநद 1SF$BDIF ۄ਋౟நद 3PVUF$BDIF ࢶDBDIFറMPBE ࢶMPBEറDBDIF ୊਺۽٘ೞחܻࣗझੌ૑ۄب ۽٬ࣘبоݒ਋ࡅܴ

    ױ ୡӝজप೯द ࣘبо࢚؀੸ਵ۽ו۰૕ࣻ੓਺ ୊਺۽٘ೞחܻࣗझח ೐ܻநदࠁ׮ࣘبоוܿ ױ ୡӝজप೯द ࢿמ੷ೞоѢ੄হ਺
  2. 18"҃೷  -0"%@$"$)&@&-4&@/&5803, -0"%@$"$)&@0/-: -0"%@%&'"6-5 -0"%@/0@$"$)& 6TFDBDIFESFTPVSDFTXIFOUIFZBSFBWBJMBCMF FWFOJGUIFZIBWFFYQJSFE %POUVTFUIFOFUXPSL MPBEGSPNUIFDBDIF

    %FGBVMUDBDIFVTBHFNPEF %POUVTFUIFDBDIF MPBEGSPNUIFOFUXPSL (JUIVCীࢲસસೞӝ ޙઁ੄8FC7JFX$BDIFࢸ੿ 
  3. ӝ؀ അप A A A A ಕ੉૑о ୊਺ী۽٬ೠ׮਺ࠗఠ۽٬হ੉ ࡅܰѱڲ׮ दр

    दр וܿ ࡅܴ ࡅܴ ࡅܴ ಕ੉૑о֎੉౭࠳୊ۢ ࡅܰѱࠁৈ૓׮ 18"҃೷  ঱ઁٚ૑நएࢎਊೞӝ
  4. 18"҃೷  A ੉۞ೠ நय ߑध ؋࠙ী ৈ۞ ಕ੉૑ۄب ࡅܰѱ

    ڸয઱ח Ѫ੉ оמ! B C ঱ઁٚ૑நएࢎਊೞӝ
  5. 18"҃೷  8FC7JFX WebView WebKit Chrome Network Stack .FNPSZ$BDIF %JTL$BDIF

    $PACKAGE_DIRECTORY/cache/org.chromium.android_webview ߹ب੄நएҙܻ੘স
  6. 18"҃೷  WebView WebKit Chrome Network Stack .FNPSZ$BDIF Service Worker

    %JTL$BDIF $PACKAGE_DIRECTORY/cache/org.chromium.android_webview 4FSWJDF8PSLFS$BDIF 8FC7JFX 18" 4FSWJDF8PSLFS $PACKAGE_DIRECTORY/app_webview/Service Worker/CacheStorage ߹ب੄நएҙܻ੘স
  7. 18"҃೷  WebView WebKit Chrome Network Stack .FNPSZ$BDIF Service Worker

    %JTL$BDIF $PACKAGE_DIRECTORY/cache/org.chromium.android_webview 4FSWJDF8PSLFS$BDIF $PACKAGE_DIRECTORY/app_webview/Service Worker/CacheStorage पઁ WebView.clearCache(…) ழߡܻ૑ 8FC7JFX 18" 4FSWJDF8PSLFS ߹ب੄நएҙܻ੘স
  8. 18"҃೷  WebView WebKit Chrome Network Stack .FNPSZ$BDIF Service Worker

    %JTL$BDIF $PACKAGE_DIRECTORY/cache/org.chromium.android_webview 4FSWJDF8PSLFS$BDIF $PACKAGE_DIRECTORY/app_webview/Service Worker/CacheStorage 18"நद࢏ઁܳਤ೧ࢶ ߹ب੄੘স೙ਃ पઁ WebView.clearCache(…) ழߡܻ૑ 8FC7JFX 18" 4FSWJDF8PSLFS ߹ب੄நएҙܻ੘স
  9. 18"҃೷  18"੄4FSWJDF8PSLFS$BDIF࢏ઁ private void removeServiceWorkerCache() { File cacheStorage =

    new File(getCacheDir() + "/../app_webview/Service Worker/CacheStorage"); clearFolder(cacheStorage); } private void clearFolder(File folder) { if (folder != null) { if (folder.isDirectory()) { File files[] = folder.listFiles(); if (files != null) { for (int i = 0; i < files.length; i++) { if (files[i].delete()) { GlobalUtil.debug("app_serviceworker", files[i].getName() + “ ࢏ઁ ࢿҕ!”); } else { GlobalUtil.debug("app_serviceworker", files[i].getName() + " ࢏ઁ पಁ ƕƕ"); } } } } } } ߹ب੄நएҙܻ੘স