SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
Little
Networks
Stacy Devino
Dallas Android Developers
Jan. 2016
STACY DEVINO
•Senior Android Innovator at The Home
Depot Dallas Technology Center
•Works on Consumer Mobile App and
Internal Product Innovation
•WTM Lead DFW, SixSigma BlackBelt,
Intel Innovator, DMS Member, Vintage
game collector/restorer
2
WEBSITES
www.stacydevino.com
www.ledgoes.com
www.openbrite.com
EMAIL
childofthehorn@gmail.com
G+
https://plus.google.com/
+StacyDevino
TWITTER
@DoesitPew
Biggest Issues
● 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
3
Tracking Your Application Data
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)
4
Capturing a PCAP
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"
5
Download + InstalL ARO
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+
6
ARO Main Summary
▪ Quick, Valuable
insight to major
issues which may be
occurring.
▪ Track Image sizes and
downloaded
resources
▪ Cached Resources
▪ Duplicated APIs
▪ Areas of Improvement
7
ARO Main Summary (Competitor)
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.
8
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! $$$$$
9
ARO Main Summary (Competitor)
10
ARO Profiles
▪ 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!)
11
ARO Overview
12
ARO Diagnostics ( i.e.Network Monitor )
13
ARO Stats
Overall Score Sheet
How did Yah do?
Eh, not bad
But, we can DO BETTER!
14
▪ 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
15
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
JPEG (or WebP) whenever possible (no Transparency needed)
ARGB_4444 for Iconography assets pulled from the network
Compress all your images (once)
Compress all your images (twice)
Compress all your images (three times a …) even PNGcrush!
Don’t be afraid to compress Lossy (especially with large images like
5MP+ Camera captured images, Google Photos does it!)
Compression on the Network != Compression in your Heap (do both)
Design your APIs to work with Screens of Many sizes
17
TL:DR Image Filtering
▪ ADJUST YOUR ASSETS BASED ON YOUR NETWORK TYPE!!!!!
▪ Very Simple, just use the BroadcastReceiver class I have
posted here: https://goo.gl/A5P1U3
▪ AND Facebook has an awesome DYNAMIC downstream
bandwidth connection class library that you can use here :
https://goo.gl/I7YLOE which can also be combined with their
YEARCLASS library here: https://goo.gl/Ztgxik
▪ That way you can dynamically adjust your API requests
for quality because SPEED MATTERS.
18
Tracking Your Network Type
Example Code
(Combine and expand)
https://github.com/childofthehorn/
network_classification_android
● 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
20
Structuring Images for Speed
21
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, ZTE,
Alcatel OneTouch phones
(Prepaid smartphones
less than $100)),
HIGH
Width : 1536
Height : 1904
MEDIUM
Width : 1050
Height : 1400
LOW
Width : 640
Height : 800
Qualities BY network type
Serialized data types
JSON
• Most popular, most APIs are formatted like this
• Easy to use libraries like RetroFit and Android Volley
• Still somewhat human-readable
XML
• Very Human-readable and alterable
• LOTS of type-casting overhead, LEAST EFFICIENT
PROTOBUFFERS
• Natively Supported on Android, but totally platform neutral (use with any Language or Platform,
even iOS, Web, and Socket connections)
• Most efficient, but still popular way
• OMG Retrofit works here too now, so try for a combo when you can
• Must have formatted data that meets the expected format almost exactly, not a lot of error
handling here, but Square has provided a tool for easy Conversion and generating code : https://
github.com/square/wire
22
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 and hopefully
charging as well (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 (promotional notifications and
asset updates) this will give your user up to date data before they even
launch the app without using more battery or network data!
Bundle Together
▪ GCMNetworkManager makes it easy to do this
(https://goo.gl/ThFuyo)
23
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. Change your API requests to ProtoBuffers (Best) and JSON if possible
6. Batching your individual application data together and offload to high
speed networks when possible
7. Bundle as a system with GcmNetworkManager
24
TL:DR API Structure
THANKS
▪ The Home Depot DTC
▪ Google Developers
▪ Dallas Android Developers
▪ Android Performance Patterns
▪ ATT
▪ WireShark
▪ Big Android BBQ Team / IDEAA
25

Mais conteúdo relacionado

Mais procurados

Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...Nicholas Jansma
 
Going Fast on the Mobile Web
Going Fast on the Mobile WebGoing Fast on the Mobile Web
Going Fast on the Mobile WebJason Grigsby
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Matthew McCullough
 
Web Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionWeb Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionDave Olsen
 
How To Build a Multi-Field Search Page For Your XPages Application
How To Build a Multi-Field Search Page For Your XPages ApplicationHow To Build a Multi-Field Search Page For Your XPages Application
How To Build a Multi-Field Search Page For Your XPages ApplicationMichael McGarel
 
The Physical World meets the Web
The Physical World meets the WebThe Physical World meets the Web
The Physical World meets the WebMaximiliano Firtman
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Matt Raible
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13Fred Sauer
 
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...Yottaa
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Webphilogb
 
Continuous Deployment: The Dirty Details
Continuous Deployment: The Dirty DetailsContinuous Deployment: The Dirty Details
Continuous Deployment: The Dirty DetailsMike Brittain
 

Mais procurados (13)

Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
Make It Fast - Using Modern Browser Performance APIs to Monitor and Improve t...
 
Going Fast on the Mobile Web
Going Fast on the Mobile WebGoing Fast on the Mobile Web
Going Fast on the Mobile Web
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
Web Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas VersionWeb Performance & You - HighEdWeb Arkansas Version
Web Performance & You - HighEdWeb Arkansas Version
 
How To Build a Multi-Field Search Page For Your XPages Application
How To Build a Multi-Field Search Page For Your XPages ApplicationHow To Build a Multi-Field Search Page For Your XPages Application
How To Build a Multi-Field Search Page For Your XPages Application
 
The Physical World meets the Web
The Physical World meets the WebThe Physical World meets the Web
The Physical World meets the Web
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
 
TxJS 2011
TxJS 2011TxJS 2011
TxJS 2011
 
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
 
Continuous Deployment: The Dirty Details
Continuous Deployment: The Dirty DetailsContinuous Deployment: The Dirty Details
Continuous Deployment: The Dirty Details
 
Agility Requires Safety
Agility Requires SafetyAgility Requires Safety
Agility Requires Safety
 

Semelhante a Big Trouble in Little Networks, new and improved

Big Trouble in Little Networks
Big Trouble in Little Networks Big Trouble in Little Networks
Big Trouble in Little Networks Stacy Devino
 
Sidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion UsersSidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion UsersDicoding
 
Batty consumerization of geospatial
Batty consumerization of geospatialBatty consumerization of geospatial
Batty consumerization of geospatialGeCo in the Rockies
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first designKyrylo Reznykov
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An IntroductionTyler Johnston
 
Are you there Page Experience? It's Me, DevTools.
Are you there Page Experience? It's Me, DevTools.Are you there Page Experience? It's Me, DevTools.
Are you there Page Experience? It's Me, DevTools.Rachel Anderson
 
Are you there Page Experience? It's me, DevTools
Are you there Page Experience? It's me, DevToolsAre you there Page Experience? It's me, DevTools
Are you there Page Experience? It's me, DevToolsJamie Indigo
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDee Sadler
 
summer file - Copy
summer file - Copysummer file - Copy
summer file - CopyRakesh Kumar
 
Lambda Architecture and open source technology stack for real time big data
Lambda Architecture and open source technology stack for real time big dataLambda Architecture and open source technology stack for real time big data
Lambda Architecture and open source technology stack for real time big dataTrieu Nguyen
 
Google Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG BelgaumGoogle Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG Belgaumsandeephegde
 
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
 
Improve your Tech Quotient
Improve your Tech QuotientImprove your Tech Quotient
Improve your Tech QuotientTarence DSouza
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloudwesley chun
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Ido Green
 
What's next? J and beyond keynote 2015
What's next? J and beyond keynote 2015What's next? J and beyond keynote 2015
What's next? J and beyond keynote 2015Christian Heilmann
 
Performance as UX with Justin Howlett
Performance as UX with Justin HowlettPerformance as UX with Justin Howlett
Performance as UX with Justin HowlettFITC
 
Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...
Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...
Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...Google Cloud Platform - Japan
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional PerformanceNicole Sullivan
 
Making operations visible - devopsdays tokyo 2013
Making operations visible  - devopsdays tokyo 2013Making operations visible  - devopsdays tokyo 2013
Making operations visible - devopsdays tokyo 2013Nick Galbreath
 

Semelhante a Big Trouble in Little Networks, new and improved (20)

Big Trouble in Little Networks
Big Trouble in Little Networks Big Trouble in Little Networks
Big Trouble in Little Networks
 
Sidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion UsersSidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion Users
 
Batty consumerization of geospatial
Batty consumerization of geospatialBatty consumerization of geospatial
Batty consumerization of geospatial
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first design
 
Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An Introduction
 
Are you there Page Experience? It's Me, DevTools.
Are you there Page Experience? It's Me, DevTools.Are you there Page Experience? It's Me, DevTools.
Are you there Page Experience? It's Me, DevTools.
 
Are you there Page Experience? It's me, DevTools
Are you there Page Experience? It's me, DevToolsAre you there Page Experience? It's me, DevTools
Are you there Page Experience? It's me, DevTools
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile design
 
summer file - Copy
summer file - Copysummer file - Copy
summer file - Copy
 
Lambda Architecture and open source technology stack for real time big data
Lambda Architecture and open source technology stack for real time big dataLambda Architecture and open source technology stack for real time big data
Lambda Architecture and open source technology stack for real time big data
 
Google Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG BelgaumGoogle Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG Belgaum
 
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
 
Improve your Tech Quotient
Improve your Tech QuotientImprove your Tech Quotient
Improve your Tech Quotient
 
Serverless computing with Google Cloud
Serverless computing with Google CloudServerless computing with Google Cloud
Serverless computing with Google Cloud
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)
 
What's next? J and beyond keynote 2015
What's next? J and beyond keynote 2015What's next? J and beyond keynote 2015
What's next? J and beyond keynote 2015
 
Performance as UX with Justin Howlett
Performance as UX with Justin HowlettPerformance as UX with Justin Howlett
Performance as UX with Justin Howlett
 
Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...
Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...
Google Developers Summit Tokyo - Google Cloud Platform で知る Google クラウドの「Googl...
 
7 Habits of Exceptional Performance
7 Habits of Exceptional Performance7 Habits of Exceptional Performance
7 Habits of Exceptional Performance
 
Making operations visible - devopsdays tokyo 2013
Making operations visible  - devopsdays tokyo 2013Making operations visible  - devopsdays tokyo 2013
Making operations visible - devopsdays tokyo 2013
 

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
 
Timings of Init : Android Ramdisks for the Practical Hacker
Timings of Init : Android Ramdisks for the Practical HackerTimings of Init : Android Ramdisks for the Practical Hacker
Timings of Init : Android Ramdisks for the Practical HackerStacy Devino
 

Mais de Stacy Devino (7)

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
 
Timings of Init : Android Ramdisks for the Practical Hacker
Timings of Init : Android Ramdisks for the Practical HackerTimings of Init : Android Ramdisks for the Practical Hacker
Timings of Init : Android Ramdisks for the Practical Hacker
 

Último

Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 

Último (20)

Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 

Big Trouble in Little Networks, new and improved

  • 2. STACY DEVINO •Senior Android Innovator at The Home Depot Dallas Technology Center •Works on Consumer Mobile App and Internal Product Innovation •WTM Lead DFW, SixSigma BlackBelt, Intel Innovator, DMS Member, Vintage game collector/restorer 2 WEBSITES www.stacydevino.com www.ledgoes.com www.openbrite.com EMAIL childofthehorn@gmail.com G+ https://plus.google.com/ +StacyDevino TWITTER @DoesitPew
  • 3. Biggest Issues ● 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 3
  • 4. Tracking Your Application Data 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) 4
  • 5. Capturing a PCAP 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" 5
  • 6. Download + InstalL ARO 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+ 6
  • 7. ARO Main Summary ▪ Quick, Valuable insight to major issues which may be occurring. ▪ Track Image sizes and downloaded resources ▪ Cached Resources ▪ Duplicated APIs ▪ Areas of Improvement 7
  • 8. ARO Main Summary (Competitor) 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. 8
  • 9. 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! $$$$$ 9
  • 10. ARO Main Summary (Competitor) 10
  • 11. ARO Profiles ▪ 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!) 11
  • 13. ARO Diagnostics ( i.e.Network Monitor ) 13
  • 14. ARO Stats Overall Score Sheet How did Yah do? Eh, not bad But, we can DO BETTER! 14
  • 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 15 Filtering your Images
  • 16. 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. JPEG (or WebP) whenever possible (no Transparency needed) ARGB_4444 for Iconography assets pulled from the network Compress all your images (once) Compress all your images (twice) Compress all your images (three times a …) even PNGcrush! Don’t be afraid to compress Lossy (especially with large images like 5MP+ Camera captured images, Google Photos does it!) Compression on the Network != Compression in your Heap (do both) Design your APIs to work with Screens of Many sizes 17 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://goo.gl/A5P1U3 ▪ AND Facebook has an awesome DYNAMIC downstream bandwidth connection class library that you can use here : https://goo.gl/I7YLOE which can also be combined with their YEARCLASS library here: https://goo.gl/Ztgxik ▪ That way you can dynamically adjust your API requests for quality because SPEED MATTERS. 18 Tracking Your Network Type
  • 19. Example Code (Combine and expand) https://github.com/childofthehorn/ network_classification_android
  • 20. ● 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 20 Structuring Images for Speed
  • 21. 21 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, ZTE, Alcatel OneTouch phones (Prepaid smartphones less than $100)), HIGH Width : 1536 Height : 1904 MEDIUM Width : 1050 Height : 1400 LOW Width : 640 Height : 800 Qualities BY network type
  • 22. Serialized data types JSON • Most popular, most APIs are formatted like this • Easy to use libraries like RetroFit and Android Volley • Still somewhat human-readable XML • Very Human-readable and alterable • LOTS of type-casting overhead, LEAST EFFICIENT PROTOBUFFERS • Natively Supported on Android, but totally platform neutral (use with any Language or Platform, even iOS, Web, and Socket connections) • Most efficient, but still popular way • OMG Retrofit works here too now, so try for a combo when you can • Must have formatted data that meets the expected format almost exactly, not a lot of error handling here, but Square has provided a tool for easy Conversion and generating code : https:// github.com/square/wire 22
  • 23. 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 and hopefully charging as well (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 (promotional notifications and asset updates) this will give your user up to date data before they even launch the app without using more battery or network data! Bundle Together ▪ GCMNetworkManager makes it easy to do this (https://goo.gl/ThFuyo) 23 Data Batching
  • 24. 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. Change your API requests to ProtoBuffers (Best) and JSON if possible 6. Batching your individual application data together and offload to high speed networks when possible 7. Bundle as a system with GcmNetworkManager 24 TL:DR API Structure
  • 25. THANKS ▪ The Home Depot DTC ▪ Google Developers ▪ Dallas Android Developers ▪ Android Performance Patterns ▪ ATT ▪ WireShark ▪ Big Android BBQ Team / IDEAA 25