SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
Little
Networks
Stacy Devino
Big Android BBQ 2015
• Senior Android Innovator at The Home Depot
Dallas Technology Center
• Works on Consumer Mobile App and Internal
Product Innovation
• WTM Lead, SixSigma BlackBelt, Intel Innovator,
DMS Member, Vintage game collector/restorer
STACY DEVINO
WEBSITES
www.stacydevino.com
www.ledgoes.com
www.openbrite.com
EMAIL
childofthehorn@gmail.com
G+
https://plus.google.com/
+StacyDevino
TWITTER
@DoesitPew
● Large, Unfiltered Images
● Untracked Data Usage (Does that API really need to be active right
now? )
● Non-optimized Network handling (Batching)
● Not Using the Android tools to help you
● Bad API designs
● Doubled / Badly Handled API calls
Biggest Issues
Using the Android Tools
Network Monitor in Android Studio
TrafficStats API in Android (http://goo.gl/9cu59J)
Watching your APIs and responses
Charles Proxy (not free, but worth the money)
Detailed Tracking of Network Data (with Forensics)
Application Resource Optimizer (ARO) by ATT (easiest)
Wireshark
Shark for Root (locally on the device)
Tracking Your Application Data
PCAP files are used to track network communications and data
Rooted Phones (see http://goo.gl/uMFv2N for non-rooted phones)
1. Grab a copy of tcpdump from http://goo.gl/YbyaA2
2. Go to Settings > Apps > Running Apps and Force Stop any services that are not part of the
Android System (or use Development options > Background process limit > At most 2
processes )
3. Now open just the app you want to test
4. Open a Terminal and type “adb push tcpdump /sdcard”, "adb shell", "su", “cp /sdcard/
tcpdump /system/xbin”, and then “chmod 755 tcpdump”
If using Wifi:
1. "tcpdump -i wlan0 -s 65535 -w /sdcard/networktrace.pcap"
If using Cellular (rmnetusb0 is also possible, look at “ip addr”):
1. "tcpdump -i rmnet0 -s 65535 -w /sdcard/networktrace.pcap"
Capturing a PCAP
1.Download the appropriate version for your OS and Mobile
Platform here : https://goo.gl/gTIvwt
2.Download the DiffTool utility for doing side by side
comparisons of before and after a change https://goo.gl/
f1ai6M
3.Source for ARO : https://github.com/attdevsupport/ARO
4.Install Dependencies : WinPCAP and JRE 6.0+
Download + InstalL ARO
Quick, Valuable insight to major
issues which may be occurring.
Track Image sizes and downloaded
resources
Cached Resources
Duplicated APIs
Areas of Improvement
ARO Main Summary
You can track your app’s
performance just as well as
you can track your
competitor. It can be a great
way to see how your app
performance in that market
compares as well as be able
to find valuable insight to
things they may be doing
right where you are not.
ARO Main Summary (Competitor)
Gives you the reasons for your
failures
No cache headers?
That could be a problem for
reused web resources, making
the device re-download (using
more data).
Cache is King! $$$$$
ARO Main Summary (Competitor)
ARO Main Summary (Competitor)
Define your own WIN parameters
Allows you to track your performance
against your user defined values.
Very useful if you have made new
Cellular performance characteristics
to your APIs and need to verify it is
within the desired performance (and
getting correct values!)
ARO Profiles
ARO Overview
ARO Diagnostics (similar to Network Monitor)
Overall Score Sheet
How did Yah do?
Eh, not bad
But, we can DO BETTER!
ARO Stats
Compression is your FRIEND
PNG vs JPEG vs WebP
85% Quality JPEG with Smoothing can reduce a 42MB PNG image to 185kb in the Real World with virtually no loss in Visible
Quality
JPEG does not support Transparency
Lossy Compression for Network pulled resources is the way to go for everything that is not a Photo app (Ok, even a Photo
Gallery... maybe not an editor)
Saves MEMORY so you don’t get the dreaded OOME (OutofMemoryError)
WebP is a Combo of the best of JPEG and PNG since it supports Transparency and High Compression, but does not work for
iPhones or universal Mobile Web (so, not a great possibility for converged APIs)
You can compress PNG lossy and losslessly, but it never quite gets to JPEG
Filtering your Images
ARGB_8888 ARGB_4444 RGB_565
Transparency X X
Number of Bits 32 16 16
Full Color
(nice Gradients)
X X
Space on Image
Memory Load (def.)
SAME SAME SAME
● ARGB_4444 and RGB_565 will be about the same in size (Data in Transit)
● ARGB_4444 is ideal for web icon assets with minimal color gradients and needing
Transparency
● No need of Transparency? RGB_565 is always ideal.
● Android will always load images into the same amount of memory, regardless of
compression, so use the Bitmap Options tools to save Memory too
Types of Images
1. JPEG (or WebP) whenever possible (no Transparency needed)
2. ARGB_4444 for Iconography assets pulled from the network
3.Compress all your images (once)
4.Compress all your images (twice)
5.Compress all your images (three times a …)
6. Don’t be afraid to compress Lossy (especially with large images like 5MP+ Camera captured
images, Google Photos does it!)
7. Compression on the Network != Compression in your Heap (do both)
8. Design your APIs to work with Screens of Many sizes
TL:DR Image Filtering
ADJUST YOUR ASSETS BASED ON YOUR NETWORK TYPE!!!!!
Very Simple, just use the BroadcastReceiver class I have posted here:
https://github.com/childofthehorn/BABBQNetworkTracker/blob/master/
app/src/main/java/com/stacydevino/networktracker/
ConnectivityChangeReceiver.java
That way you can dynamically adjust your API requests for quality
because SPEED MATTERS.
Tracking Your Network Type
● Allows you to account for Multiple
Screen sizes without skewing
● Dynamic Quality adjustment
based on networks (Bigger
screens can go down)
● Never get larger images than
what you need
● Build based off of the devices you
want to support.
● iPhones can also be accounted
for in the Android sizing
Structuring Images for Speed
Ratio : 0.56:1 (16:9)
Devices : iPhone 5/6/6+,
Samsung 3/4/5/6 (Android
Devices with Hardware buttons)
HIGH
Width : 1440
Height : 2560
MEDIUM
Width : 1080
Height : 1920
LOW
Width : 720
Height : 1280
Ratio : 0.63:1
Devices : iPhone 4, OnePlus
1/2, Nexus 5/5x/6/6p/7(2013)/
7(2014), Moto X, G, E
(2013-2015) (Android devices
with software buttons)
HIGH
Width : 1440
Height : 2268
MEDIUM
Width : 1080
Height : 1701
LOW
Width : 720
Height : 1134
Ratio : 0.81:1
Devices : Nexus 9, Samsung
Tab S2, Samsung Galaxy
Centura , ZTE, Alcatel
OneTouch phones (Prepaid
smartphones less than $100)),
HIGH
Width : 1536
Height : 1904
MEDIUM
Width : 1050
Height : 1400
LOW
Width : 640
Height : 800
Tracking your network type
Batching your Data is one of the easiest ways to optimize your usage
of Cellular data.
Bundle Yourself
Wait to offload large datasets ’til the user is on Wifi (metrics and user behavior)
JSON is not very efficient (XML is way worse), see if it is possible to switch to buffered
data or binary files. Even CSV is more efficient...I know, right?
Bundle your requests and waits together
Bundle Together : GCMNetworkManager makes it easy to do this (https://goo.gl/ThFuyo)
Data Batching
1. Use lower quality images in low quality networks
2. Time to User matters (you only have a few hundred milliseconds)
3. Allow users to dictate resources and run in a low-usage network mode (best
performance vs. best quality)
4. You can handle virtually all resources with just 3 aspect ratios for all of Android and
iOS, as well as mobile web (Spiffy!)
5. Batching your individual application data together and offload to high speed
networks when possible
6. Bundle as a system with GcmNetworkManager
TL:DR API Structure
The Home Depot DTC
Google Developers
Android Performance Patterns
ATT and WireShark
Big Android BBQ Team / IDEAA
THANKS !

Mais conteúdo relacionado

Semelhante a Big Trouble in Little Networks

Performance as UX with Justin Howlett
Performance as UX with Justin HowlettPerformance as UX with Justin Howlett
Performance as UX with Justin HowlettFITC
 
Getting Started with Progressive Web Apps
Getting Started with Progressive Web AppsGetting Started with Progressive Web Apps
Getting Started with Progressive Web AppsBill Stavroulakis
 
Improve your Tech Quotient
Improve your Tech QuotientImprove your Tech Quotient
Improve your Tech QuotientTarence DSouza
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Ido Green
 
Android v 1.1
Android v 1.1Android v 1.1
Android v 1.1Ravi Vyas
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An IntroductionTyler Johnston
 
21 app packaging, monetization and publication
21   app packaging, monetization and publication21   app packaging, monetization and publication
21 app packaging, monetization and publicationWindowsPhoneRocks
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011davyjones
 
Top 13 web scraping tools in 2022
Top 13 web scraping tools in 2022Top 13 web scraping tools in 2022
Top 13 web scraping tools in 2022Aparna Sharma
 
Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011Eli White
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloudwesley chun
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011sullis
 
A Look Under the Hood of H2O Driverless AI, Arno Candel - H2O World San Franc...
A Look Under the Hood of H2O Driverless AI, Arno Candel - H2O World San Franc...A Look Under the Hood of H2O Driverless AI, Arno Candel - H2O World San Franc...
A Look Under the Hood of H2O Driverless AI, Arno Candel - H2O World San Franc...Sri Ambati
 
Batty consumerization of geospatial
Batty consumerization of geospatialBatty consumerization of geospatial
Batty consumerization of geospatialGeCo in the Rockies
 
European SharePoint Conference: Mobile Applications for SharePoint using HTML5
European SharePoint Conference: Mobile Applications for SharePoint using HTML5European SharePoint Conference: Mobile Applications for SharePoint using HTML5
European SharePoint Conference: Mobile Applications for SharePoint using HTML5Christian Heindel
 
An introduction to Titanium
An introduction to TitaniumAn introduction to Titanium
An introduction to TitaniumGraham Weldon
 
Supporting multi screen in android cn
Supporting multi screen in android cnSupporting multi screen in android cn
Supporting multi screen in android cnrffffffff007
 
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...Codemotion
 

Semelhante a Big Trouble in Little Networks (20)

Performance as UX with Justin Howlett
Performance as UX with Justin HowlettPerformance as UX with Justin Howlett
Performance as UX with Justin Howlett
 
Getting Started with Progressive Web Apps
Getting Started with Progressive Web AppsGetting Started with Progressive Web Apps
Getting Started with Progressive Web Apps
 
Improve your Tech Quotient
Improve your Tech QuotientImprove your Tech Quotient
Improve your Tech Quotient
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)
 
Android v 1.1
Android v 1.1Android v 1.1
Android v 1.1
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An Introduction
 
21 app packaging, monetization and publication
21   app packaging, monetization and publication21   app packaging, monetization and publication
21 app packaging, monetization and publication
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
 
Top 13 web scraping tools in 2022
Top 13 web scraping tools in 2022Top 13 web scraping tools in 2022
Top 13 web scraping tools in 2022
 
Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloud
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
 
A Look Under the Hood of H2O Driverless AI, Arno Candel - H2O World San Franc...
A Look Under the Hood of H2O Driverless AI, Arno Candel - H2O World San Franc...A Look Under the Hood of H2O Driverless AI, Arno Candel - H2O World San Franc...
A Look Under the Hood of H2O Driverless AI, Arno Candel - H2O World San Franc...
 
Batty consumerization of geospatial
Batty consumerization of geospatialBatty consumerization of geospatial
Batty consumerization of geospatial
 
European SharePoint Conference: Mobile Applications for SharePoint using HTML5
European SharePoint Conference: Mobile Applications for SharePoint using HTML5European SharePoint Conference: Mobile Applications for SharePoint using HTML5
European SharePoint Conference: Mobile Applications for SharePoint using HTML5
 
An introduction to Titanium
An introduction to TitaniumAn introduction to Titanium
An introduction to Titanium
 
Supporting multi screen in android cn
Supporting multi screen in android cnSupporting multi screen in android cn
Supporting multi screen in android cn
 
Cloud Economics
Cloud EconomicsCloud Economics
Cloud Economics
 
POV | Unity vs HTML5 | Affle Enterprise
POV | Unity vs HTML5 | Affle EnterprisePOV | Unity vs HTML5 | Affle Enterprise
POV | Unity vs HTML5 | Affle Enterprise
 
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
 

Mais de Stacy Devino

IoT with Firebase : IoT DevFest Phoenix 2018
IoT with Firebase : IoT DevFest Phoenix 2018IoT with Firebase : IoT DevFest Phoenix 2018
IoT with Firebase : IoT DevFest Phoenix 2018Stacy Devino
 
Beautiful text spread your wings with Spannables
Beautiful text   spread your wings with SpannablesBeautiful text   spread your wings with Spannables
Beautiful text spread your wings with SpannablesStacy Devino
 
Async task, threads, pools, and executors oh my!
Async task, threads, pools, and executors oh my!Async task, threads, pools, and executors oh my!
Async task, threads, pools, and executors oh my!Stacy Devino
 
Intro to Android : Making your first App!
Intro to Android : Making your first App!Intro to Android : Making your first App!
Intro to Android : Making your first App!Stacy Devino
 
RetroFit by Square - GDG Dallas 06/09/16
RetroFit by Square - GDG Dallas 06/09/16RetroFit by Square - GDG Dallas 06/09/16
RetroFit by Square - GDG Dallas 06/09/16Stacy Devino
 
WWC 3D printing basics with stacy devino
WWC 3D printing basics with stacy devinoWWC 3D printing basics with stacy devino
WWC 3D printing basics with stacy devinoStacy Devino
 

Mais de Stacy Devino (6)

IoT with Firebase : IoT DevFest Phoenix 2018
IoT with Firebase : IoT DevFest Phoenix 2018IoT with Firebase : IoT DevFest Phoenix 2018
IoT with Firebase : IoT DevFest Phoenix 2018
 
Beautiful text spread your wings with Spannables
Beautiful text   spread your wings with SpannablesBeautiful text   spread your wings with Spannables
Beautiful text spread your wings with Spannables
 
Async task, threads, pools, and executors oh my!
Async task, threads, pools, and executors oh my!Async task, threads, pools, and executors oh my!
Async task, threads, pools, and executors oh my!
 
Intro to Android : Making your first App!
Intro to Android : Making your first App!Intro to Android : Making your first App!
Intro to Android : Making your first App!
 
RetroFit by Square - GDG Dallas 06/09/16
RetroFit by Square - GDG Dallas 06/09/16RetroFit by Square - GDG Dallas 06/09/16
RetroFit by Square - GDG Dallas 06/09/16
 
WWC 3D printing basics with stacy devino
WWC 3D printing basics with stacy devinoWWC 3D printing basics with stacy devino
WWC 3D printing basics with stacy devino
 

Último

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 

Último (20)

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

Big Trouble in Little Networks

  • 2. • Senior Android Innovator at The Home Depot Dallas Technology Center • Works on Consumer Mobile App and Internal Product Innovation • WTM Lead, SixSigma BlackBelt, Intel Innovator, DMS Member, Vintage game collector/restorer STACY DEVINO WEBSITES www.stacydevino.com www.ledgoes.com www.openbrite.com EMAIL childofthehorn@gmail.com G+ https://plus.google.com/ +StacyDevino TWITTER @DoesitPew
  • 3. ● Large, Unfiltered Images ● Untracked Data Usage (Does that API really need to be active right now? ) ● Non-optimized Network handling (Batching) ● Not Using the Android tools to help you ● Bad API designs ● Doubled / Badly Handled API calls Biggest Issues
  • 4. Using the Android Tools Network Monitor in Android Studio TrafficStats API in Android (http://goo.gl/9cu59J) Watching your APIs and responses Charles Proxy (not free, but worth the money) Detailed Tracking of Network Data (with Forensics) Application Resource Optimizer (ARO) by ATT (easiest) Wireshark Shark for Root (locally on the device) Tracking Your Application Data
  • 5. PCAP files are used to track network communications and data Rooted Phones (see http://goo.gl/uMFv2N for non-rooted phones) 1. Grab a copy of tcpdump from http://goo.gl/YbyaA2 2. Go to Settings > Apps > Running Apps and Force Stop any services that are not part of the Android System (or use Development options > Background process limit > At most 2 processes ) 3. Now open just the app you want to test 4. Open a Terminal and type “adb push tcpdump /sdcard”, "adb shell", "su", “cp /sdcard/ tcpdump /system/xbin”, and then “chmod 755 tcpdump” If using Wifi: 1. "tcpdump -i wlan0 -s 65535 -w /sdcard/networktrace.pcap" If using Cellular (rmnetusb0 is also possible, look at “ip addr”): 1. "tcpdump -i rmnet0 -s 65535 -w /sdcard/networktrace.pcap" Capturing a PCAP
  • 6. 1.Download the appropriate version for your OS and Mobile Platform here : https://goo.gl/gTIvwt 2.Download the DiffTool utility for doing side by side comparisons of before and after a change https://goo.gl/ f1ai6M 3.Source for ARO : https://github.com/attdevsupport/ARO 4.Install Dependencies : WinPCAP and JRE 6.0+ Download + InstalL ARO
  • 7. Quick, Valuable insight to major issues which may be occurring. Track Image sizes and downloaded resources Cached Resources Duplicated APIs Areas of Improvement ARO Main Summary
  • 8. You can track your app’s performance just as well as you can track your competitor. It can be a great way to see how your app performance in that market compares as well as be able to find valuable insight to things they may be doing right where you are not. ARO Main Summary (Competitor)
  • 9. Gives you the reasons for your failures No cache headers? That could be a problem for reused web resources, making the device re-download (using more data). Cache is King! $$$$$ ARO Main Summary (Competitor)
  • 10. ARO Main Summary (Competitor)
  • 11. Define your own WIN parameters Allows you to track your performance against your user defined values. Very useful if you have made new Cellular performance characteristics to your APIs and need to verify it is within the desired performance (and getting correct values!) ARO Profiles
  • 13. ARO Diagnostics (similar to Network Monitor)
  • 14. Overall Score Sheet How did Yah do? Eh, not bad But, we can DO BETTER! ARO Stats
  • 15. Compression is your FRIEND PNG vs JPEG vs WebP 85% Quality JPEG with Smoothing can reduce a 42MB PNG image to 185kb in the Real World with virtually no loss in Visible Quality JPEG does not support Transparency Lossy Compression for Network pulled resources is the way to go for everything that is not a Photo app (Ok, even a Photo Gallery... maybe not an editor) Saves MEMORY so you don’t get the dreaded OOME (OutofMemoryError) WebP is a Combo of the best of JPEG and PNG since it supports Transparency and High Compression, but does not work for iPhones or universal Mobile Web (so, not a great possibility for converged APIs) You can compress PNG lossy and losslessly, but it never quite gets to JPEG Filtering your Images
  • 16. ARGB_8888 ARGB_4444 RGB_565 Transparency X X Number of Bits 32 16 16 Full Color (nice Gradients) X X Space on Image Memory Load (def.) SAME SAME SAME ● ARGB_4444 and RGB_565 will be about the same in size (Data in Transit) ● ARGB_4444 is ideal for web icon assets with minimal color gradients and needing Transparency ● No need of Transparency? RGB_565 is always ideal. ● Android will always load images into the same amount of memory, regardless of compression, so use the Bitmap Options tools to save Memory too Types of Images
  • 17. 1. JPEG (or WebP) whenever possible (no Transparency needed) 2. ARGB_4444 for Iconography assets pulled from the network 3.Compress all your images (once) 4.Compress all your images (twice) 5.Compress all your images (three times a …) 6. Don’t be afraid to compress Lossy (especially with large images like 5MP+ Camera captured images, Google Photos does it!) 7. Compression on the Network != Compression in your Heap (do both) 8. Design your APIs to work with Screens of Many sizes TL:DR Image Filtering
  • 18. ADJUST YOUR ASSETS BASED ON YOUR NETWORK TYPE!!!!! Very Simple, just use the BroadcastReceiver class I have posted here: https://github.com/childofthehorn/BABBQNetworkTracker/blob/master/ app/src/main/java/com/stacydevino/networktracker/ ConnectivityChangeReceiver.java That way you can dynamically adjust your API requests for quality because SPEED MATTERS. Tracking Your Network Type
  • 19. ● Allows you to account for Multiple Screen sizes without skewing ● Dynamic Quality adjustment based on networks (Bigger screens can go down) ● Never get larger images than what you need ● Build based off of the devices you want to support. ● iPhones can also be accounted for in the Android sizing Structuring Images for Speed
  • 20. Ratio : 0.56:1 (16:9) Devices : iPhone 5/6/6+, Samsung 3/4/5/6 (Android Devices with Hardware buttons) HIGH Width : 1440 Height : 2560 MEDIUM Width : 1080 Height : 1920 LOW Width : 720 Height : 1280 Ratio : 0.63:1 Devices : iPhone 4, OnePlus 1/2, Nexus 5/5x/6/6p/7(2013)/ 7(2014), Moto X, G, E (2013-2015) (Android devices with software buttons) HIGH Width : 1440 Height : 2268 MEDIUM Width : 1080 Height : 1701 LOW Width : 720 Height : 1134 Ratio : 0.81:1 Devices : Nexus 9, Samsung Tab S2, Samsung Galaxy Centura , ZTE, Alcatel OneTouch phones (Prepaid smartphones less than $100)), HIGH Width : 1536 Height : 1904 MEDIUM Width : 1050 Height : 1400 LOW Width : 640 Height : 800 Tracking your network type
  • 21. Batching your Data is one of the easiest ways to optimize your usage of Cellular data. Bundle Yourself Wait to offload large datasets ’til the user is on Wifi (metrics and user behavior) JSON is not very efficient (XML is way worse), see if it is possible to switch to buffered data or binary files. Even CSV is more efficient...I know, right? Bundle your requests and waits together Bundle Together : GCMNetworkManager makes it easy to do this (https://goo.gl/ThFuyo) Data Batching
  • 22. 1. Use lower quality images in low quality networks 2. Time to User matters (you only have a few hundred milliseconds) 3. Allow users to dictate resources and run in a low-usage network mode (best performance vs. best quality) 4. You can handle virtually all resources with just 3 aspect ratios for all of Android and iOS, as well as mobile web (Spiffy!) 5. Batching your individual application data together and offload to high speed networks when possible 6. Bundle as a system with GcmNetworkManager TL:DR API Structure
  • 23. The Home Depot DTC Google Developers Android Performance Patterns ATT and WireShark Big Android BBQ Team / IDEAA THANKS !