SlideShare a Scribd company logo
1 of 30
Download to read offline
JSON, Memory Usage & Interaction Design
Experience in Boosting Performance for an iOS / Android Application
Lucas Nguyen
VINOVA Pte. Ltd.
info@vinova.sg
About VINOVA
•  Vinova = Vibrant Innovators
–  iOS / Android / Windows Phone
–  For Singapore Enterprises & Organizations
•  2010 Founded in Singapore
•  2011 Representative Office in Hanoi
•  2012+ Push for Mobile Game
About ME
•  Lead Mobile Developer at VINOVA
•  3-year experience on Native iOS,
Android, and Cross-Platform
Technologies
•  Backend Web Services using
Ruby on Rails
Lucas Nguyen	
  
Great Client
Singapore Press Holdings (SPH) - 

Southeast Asia’s Leading Media Organization
Big PROJECT
•  Straits Times Online Mobile Print (STOMP)
•  Award-winning website & mobile app
•  Singaporean connecting, engaging and interacting
•  0.5m concurrent users at peak hours
•  1.8m page-views per day
MISSION
Revamp a very popular iOS & Android app to serve
end-users better, faster!
STOMP v1
 STOMP v2
Old Version
New version
Challenges:
•  Complex Design
•  Lots of Advertisement Banners
•  Old, Slow & Heavy APIs (14.7MB of XML in total)
1-Star Rating
 User Complains
Client’s Dissatisfaction
App Crashes & Hangs
When We Took Over The Project
What Did We Think?
F i n d 	
   	
   	
   t h e 	
   	
   	
   	
   s o l u t i o n 	
  
How Did We Solve The Problem?
1 2 3
XML to JSON Conversion
•  Heavy
•  Slow
•  Uncontrolled
•  Light
•  Fast
•  Controlled
Lightning Server
Remove reduntdant data
•  Full image URLs? NO!
•  Just need [id] and [token] to regenerate the URL
–  thumbnail: http://dswww.stomp.com.sg/site/servlet/
iphone/photo?photoId=#{id}
–  image: http://static.stomp.com.sg/site/servlet/
linkableblob/stomp/#{id}/data/#{token}-data.jpg
{!
id: "1668324” !
title: ”Butter Factory’s…”,!
thumbnails: […],!
images: […]!
}!
JSON Optimization
Article items:
•  Small
•  A lot
•  Need to parse first!
à Keep raw
Article detail:
•  Big
•  Need one at a time
•  Have more time to parse


à Gzip to binary à Encode base64
Our JSON format
•  Primary data for main screen
(categories & articles listing)
•  Secondary data for article detail screen
{!
id: "1668324” !
title: ”Butter Factory’s…”,!
}!
"eNp1VF2v2zYM/SuEnzYgTfz90bcVaDdcoN...“	
  
{!
"date" => "26 Mar 2013",!
"views" => "16160",!
"comments" => "53",!
"content" => ”A 61-year-old retiree…”,!
"photos" => [...]!
}!
Unpacked
Best compression method
Format	
   Size	
  (MB)	
   %	
  Remaining	
  
	
  Raw	
  XML	
   14.7	
  MB	
   100%	
  
(1)	
  Compact	
  JSON	
   6.0	
  MB	
   40%	
  
(2)	
  Compressed	
  &	
  Compact	
  JSON	
   3.8	
  MB	
   25%	
  
(3)	
  Compressed	
  &	
  Compact	
  BSON	
   2.9	
  MB	
   20%	
  
Best of both worlds:
•  ¼ size reduced
•  Easy to read
•  Easy to decode with popular libs

•  Much Faster & Lighter APIs
•  Easier to scale (using CDN)
•  Smaller Mobile Memory Usage
Watch Out for Memory Usage
Memory Usage
Memory Allocation
100	
  MB	
  	
  
20	
  MB	
  
using
 allocate
10	
  MB	
  
using
 allocate
20	
  MB	
  
Before	
  
AHer	
  
Load remote data one-by-one
If load 3 ~ 5 categories at the same time 
à Allocate 10MB ~ 25MB simutaneously
à Memory Warning
Release memory allocated for off-screen list items
Smartphone’s screen is small

à  No need to show more than 5
categories at once
à  Release all invisible components
to reduce memory usage
1
2
3
4
5
Photos are dangrous, just like girls
•  Only load visible photos!
•  Large photo is beautiful, but:
–  Take more bandwidth
–  Take more memory & GPU to render

Photos
 Quan9ty
 Avg.	
  Size
 Memory	
  Usage
high res.
 20	
  ~	
  24
 ~30KB
 10MB	
  ~	
  15MB
low res.
 20	
  ~	
  24
 ~05KB
 03MB	
  ~	
  04MB
ad banners take LotS of memory
1MB	
  Image	
  
+	
  
memory	
  for	
  Views	
  
Interaction DesiGn
Don’t Follow the
Design Strictly
One mission per screen
One	
  big	
  screen:	
  
ArTcle	
  +	
  Comments	
  
ArTcle	
   Comments	
  
Separate	
  
•  Not everyone needs to see
comments
•  Better UX
•  Lighter UI
User is touching, not clicking, make it easy
•  Original designed button is small 

à hard to see and touch
•  Make it wider!
Original
 Wider
Test on low-end devices
iPhone-5
 iPhone-4S
 iPhone-4
 iPhone-3GS
1GB
 512 MB
 512 MB
 256 MB
Dual-core 1.2 GHz
 Dual-core 1 GHz
 1 GHz
 600 MHz
Don’t Believe in Anything ...
•  No assumptions
•  Update 3rd party libraries
usually

•  APIs won’t work 100%
•  Handle exceptions
Thank you!
http://vinova.sg/summerschool
http://vinova.sg/internship


ĐÔI LỜI NHẮN NHỦ CÁC BẠN SINH VIÊN
Vibrant Innovators
Những người đổi mới đầy nhiệt huyết

More Related Content

What's hot

Rock'in with Russ & Xamarin Forms (FBI Deck)
Rock'in with Russ & Xamarin Forms (FBI Deck)Rock'in with Russ & Xamarin Forms (FBI Deck)
Rock'in with Russ & Xamarin Forms (FBI Deck)Russ Fustino
 
OS3 - Enterprise Ireland - Approaches To I Phone Development & The Irish iPho...
OS3 - Enterprise Ireland - Approaches To I Phone Development & The Irish iPho...OS3 - Enterprise Ireland - Approaches To I Phone Development & The Irish iPho...
OS3 - Enterprise Ireland - Approaches To I Phone Development & The Irish iPho...Damian OSuilleabhain
 
Responsive Email Design
Responsive Email DesignResponsive Email Design
Responsive Email DesignAnna Yeaman
 
Word press theme and plugins WordCamp Presentation
Word press theme and plugins WordCamp PresentationWord press theme and plugins WordCamp Presentation
Word press theme and plugins WordCamp PresentationAngela Samuels
 
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...Fabien Marry
 
Increasing downloads, ratings and revenues
Increasing downloads, ratings and revenues Increasing downloads, ratings and revenues
Increasing downloads, ratings and revenues BlrDroid
 
How to optimize your blog for mobile traffic
How to optimize your blog for mobile trafficHow to optimize your blog for mobile traffic
How to optimize your blog for mobile trafficgroceryalerts
 
Dnn connect dnnmobi-slides
Dnn connect dnnmobi-slidesDnn connect dnnmobi-slides
Dnn connect dnnmobi-slidesashishpd
 
Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappFred Lin
 
Session 1. iOS developers enthusiasts session
Session 1. iOS developers enthusiasts sessionSession 1. iOS developers enthusiasts session
Session 1. iOS developers enthusiasts sessionGAME Studios
 
HTC desire 516 review
HTC desire 516 reviewHTC desire 516 review
HTC desire 516 review91mobiles
 
Eye candy for your iPhone
Eye candy for your iPhoneEye candy for your iPhone
Eye candy for your iPhoneBrian Shim
 
Developing the Windows Phone User Experience
Developing the Windows Phone User ExperienceDeveloping the Windows Phone User Experience
Developing the Windows Phone User ExperienceKaushal Bhavsar
 

What's hot (19)

Top 10 Android Apps
Top 10 Android AppsTop 10 Android Apps
Top 10 Android Apps
 
Rock'in with Russ & Xamarin Forms (FBI Deck)
Rock'in with Russ & Xamarin Forms (FBI Deck)Rock'in with Russ & Xamarin Forms (FBI Deck)
Rock'in with Russ & Xamarin Forms (FBI Deck)
 
OS3 - Enterprise Ireland - Approaches To I Phone Development & The Irish iPho...
OS3 - Enterprise Ireland - Approaches To I Phone Development & The Irish iPho...OS3 - Enterprise Ireland - Approaches To I Phone Development & The Irish iPho...
OS3 - Enterprise Ireland - Approaches To I Phone Development & The Irish iPho...
 
Smartphones
SmartphonesSmartphones
Smartphones
 
Responsive Email Design
Responsive Email DesignResponsive Email Design
Responsive Email Design
 
Word press theme and plugins WordCamp Presentation
Word press theme and plugins WordCamp PresentationWord press theme and plugins WordCamp Presentation
Word press theme and plugins WordCamp Presentation
 
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
 
Why Mobile Matters | Avvo Webinar
Why Mobile Matters | Avvo WebinarWhy Mobile Matters | Avvo Webinar
Why Mobile Matters | Avvo Webinar
 
Increasing downloads, ratings and revenues
Increasing downloads, ratings and revenues Increasing downloads, ratings and revenues
Increasing downloads, ratings and revenues
 
How to optimize your blog for mobile traffic
How to optimize your blog for mobile trafficHow to optimize your blog for mobile traffic
How to optimize your blog for mobile traffic
 
Dnn connect dnnmobi-slides
Dnn connect dnnmobi-slidesDnn connect dnnmobi-slides
Dnn connect dnnmobi-slides
 
2015 Web Design Trends
2015 Web Design Trends 2015 Web Design Trends
2015 Web Design Trends
 
Why go mobile
Why go mobileWhy go mobile
Why go mobile
 
Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox Webapp
 
Session 1. iOS developers enthusiasts session
Session 1. iOS developers enthusiasts sessionSession 1. iOS developers enthusiasts session
Session 1. iOS developers enthusiasts session
 
HTC desire 516 review
HTC desire 516 reviewHTC desire 516 review
HTC desire 516 review
 
Eye candy for your iPhone
Eye candy for your iPhoneEye candy for your iPhone
Eye candy for your iPhone
 
Cafaholic ppt
Cafaholic pptCafaholic ppt
Cafaholic ppt
 
Developing the Windows Phone User Experience
Developing the Windows Phone User ExperienceDeveloping the Windows Phone User Experience
Developing the Windows Phone User Experience
 

Similar to [Vietnam Mobile Day 2013] - tối ưu hóa cho mobile json, bộ nhớ và tương tác

Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An IntroductionTyler Johnston
 
Use Case: integrating a complex e-commerce site - Frenchtoday.com
Use Case: integrating a complex e-commerce site - Frenchtoday.comUse Case: integrating a complex e-commerce site - Frenchtoday.com
Use Case: integrating a complex e-commerce site - Frenchtoday.comOlivier Karfis
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesAndy_Gaskell
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Nuxeo
 
Creating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone GapCreating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone GapFITC
 
Beyond the Desktop: Sites and Apps for Phones and Tablets
Beyond the Desktop: Sites and Apps for Phones and TabletsBeyond the Desktop: Sites and Apps for Phones and Tablets
Beyond the Desktop: Sites and Apps for Phones and TabletsWebvanta
 
Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?Indiginox
 
Vn mobile day2013 - zalo sharing
Vn mobile day2013 - zalo sharingVn mobile day2013 - zalo sharing
Vn mobile day2013 - zalo sharingThanh Dao
 
What is your mobile strategy?
What is your mobile strategy?What is your mobile strategy?
What is your mobile strategy?Emily Massey
 
Extreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile DevicesExtreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile DevicesMaximiliano Firtman
 
Windows Phone Dev Day Bournemouth Presentation
Windows Phone Dev Day Bournemouth PresentationWindows Phone Dev Day Bournemouth Presentation
Windows Phone Dev Day Bournemouth PresentationJames Mundy
 
Building Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScriptBuilding Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScriptJonathan Stark
 
Isomorphic Aplication with Javascript
Isomorphic Aplication with JavascriptIsomorphic Aplication with Javascript
Isomorphic Aplication with JavascriptHengki Sihombing
 
[Vietnam Mobile Day 2013] - Developing a mobile messenger for the audience of...
[Vietnam Mobile Day 2013] - Developing a mobile messenger for the audience of...[Vietnam Mobile Day 2013] - Developing a mobile messenger for the audience of...
[Vietnam Mobile Day 2013] - Developing a mobile messenger for the audience of...AiTi Education
 
Introduction to iPhone App Development - midVentures DESIGN+DEVELOP
Introduction to iPhone App Development - midVentures DESIGN+DEVELOPIntroduction to iPhone App Development - midVentures DESIGN+DEVELOP
Introduction to iPhone App Development - midVentures DESIGN+DEVELOPKeyLimeTie
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building ProductsHayden Bleasel
 
Intro to tech stacks bonny
Intro to tech stacks bonnyIntro to tech stacks bonny
Intro to tech stacks bonnyLama K Banna
 

Similar to [Vietnam Mobile Day 2013] - tối ưu hóa cho mobile json, bộ nhớ và tương tác (20)

Phonegap - An Introduction
Phonegap - An IntroductionPhonegap - An Introduction
Phonegap - An Introduction
 
Use Case: integrating a complex e-commerce site - Frenchtoday.com
Use Case: integrating a complex e-commerce site - Frenchtoday.comUse Case: integrating a complex e-commerce site - Frenchtoday.com
Use Case: integrating a complex e-commerce site - Frenchtoday.com
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
 
Creating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone GapCreating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone Gap
 
Beyond the Desktop: Sites and Apps for Phones and Tablets
Beyond the Desktop: Sites and Apps for Phones and TabletsBeyond the Desktop: Sites and Apps for Phones and Tablets
Beyond the Desktop: Sites and Apps for Phones and Tablets
 
Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?Why Do Mobile Projects Fail?
Why Do Mobile Projects Fail?
 
Vn mobile day2013 - zalo sharing
Vn mobile day2013 - zalo sharingVn mobile day2013 - zalo sharing
Vn mobile day2013 - zalo sharing
 
What is your mobile strategy?
What is your mobile strategy?What is your mobile strategy?
What is your mobile strategy?
 
Simple mobile Websites
Simple mobile WebsitesSimple mobile Websites
Simple mobile Websites
 
Extreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile DevicesExtreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile Devices
 
Windows Phone Dev Day Bournemouth Presentation
Windows Phone Dev Day Bournemouth PresentationWindows Phone Dev Day Bournemouth Presentation
Windows Phone Dev Day Bournemouth Presentation
 
Building Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScriptBuilding Mobile Apps with HTML, CSS, and JavaScript
Building Mobile Apps with HTML, CSS, and JavaScript
 
Mobile web performance dwx13
Mobile web performance dwx13Mobile web performance dwx13
Mobile web performance dwx13
 
Php ey final
Php ey finalPhp ey final
Php ey final
 
Isomorphic Aplication with Javascript
Isomorphic Aplication with JavascriptIsomorphic Aplication with Javascript
Isomorphic Aplication with Javascript
 
[Vietnam Mobile Day 2013] - Developing a mobile messenger for the audience of...
[Vietnam Mobile Day 2013] - Developing a mobile messenger for the audience of...[Vietnam Mobile Day 2013] - Developing a mobile messenger for the audience of...
[Vietnam Mobile Day 2013] - Developing a mobile messenger for the audience of...
 
Introduction to iPhone App Development - midVentures DESIGN+DEVELOP
Introduction to iPhone App Development - midVentures DESIGN+DEVELOPIntroduction to iPhone App Development - midVentures DESIGN+DEVELOP
Introduction to iPhone App Development - midVentures DESIGN+DEVELOP
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building Products
 
Intro to tech stacks bonny
Intro to tech stacks bonnyIntro to tech stacks bonny
Intro to tech stacks bonny
 

More from AiTi Education

AiTi Education Profile
AiTi Education ProfileAiTi Education Profile
AiTi Education ProfileAiTi Education
 
AiTi Education Software Testing Session 03
AiTi Education Software Testing Session 03AiTi Education Software Testing Session 03
AiTi Education Software Testing Session 03AiTi Education
 
AiTi Education Software Testing Session 02 b
AiTi Education Software Testing Session 02 bAiTi Education Software Testing Session 02 b
AiTi Education Software Testing Session 02 bAiTi Education
 
AiTi Education Software Testing Session 02 a
AiTi Education Software Testing Session 02 aAiTi Education Software Testing Session 02 a
AiTi Education Software Testing Session 02 aAiTi Education
 
AiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 bAiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 bAiTi Education
 
AiTi Education Software Testing Session 01 a
AiTi Education Software Testing Session 01 aAiTi Education Software Testing Session 01 a
AiTi Education Software Testing Session 01 aAiTi Education
 
Vietnam mobile internet_2014_mwork_vietnam_mobile_day
Vietnam mobile internet_2014_mwork_vietnam_mobile_dayVietnam mobile internet_2014_mwork_vietnam_mobile_day
Vietnam mobile internet_2014_mwork_vietnam_mobile_dayAiTi Education
 
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...AiTi Education
 
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...AiTi Education
 
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...AiTi Education
 
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...AiTi Education
 
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...AiTi Education
 
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...AiTi Education
 
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...AiTi Education
 
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...AiTi Education
 
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - Ng...
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - 	 Ng...[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - 	 Ng...
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - Ng...AiTi Education
 
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...AiTi Education
 
[Vietnam Mobile Day 2014] Xu hướng trong Mobile Learning, 2014 - Nguyễn Thàn...
[Vietnam Mobile Day 2014] Xu hướng trong Mobile Learning, 2014  - Nguyễn Thàn...[Vietnam Mobile Day 2014] Xu hướng trong Mobile Learning, 2014  - Nguyễn Thàn...
[Vietnam Mobile Day 2014] Xu hướng trong Mobile Learning, 2014 - Nguyễn Thàn...AiTi Education
 
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....AiTi Education
 
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....AiTi Education
 

More from AiTi Education (20)

AiTi Education Profile
AiTi Education ProfileAiTi Education Profile
AiTi Education Profile
 
AiTi Education Software Testing Session 03
AiTi Education Software Testing Session 03AiTi Education Software Testing Session 03
AiTi Education Software Testing Session 03
 
AiTi Education Software Testing Session 02 b
AiTi Education Software Testing Session 02 bAiTi Education Software Testing Session 02 b
AiTi Education Software Testing Session 02 b
 
AiTi Education Software Testing Session 02 a
AiTi Education Software Testing Session 02 aAiTi Education Software Testing Session 02 a
AiTi Education Software Testing Session 02 a
 
AiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 bAiTi Education Software Testing Session 01 b
AiTi Education Software Testing Session 01 b
 
AiTi Education Software Testing Session 01 a
AiTi Education Software Testing Session 01 aAiTi Education Software Testing Session 01 a
AiTi Education Software Testing Session 01 a
 
Vietnam mobile internet_2014_mwork_vietnam_mobile_day
Vietnam mobile internet_2014_mwork_vietnam_mobile_dayVietnam mobile internet_2014_mwork_vietnam_mobile_day
Vietnam mobile internet_2014_mwork_vietnam_mobile_day
 
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
[Vietnam Mobile Day 2014] Tăng doanh thu quảng cáo cho mobile site và ứng dụn...
 
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
[Vietnam Mobile Day 2014] Mobile money - Xu hướng thanh toán nhỏ trên mobile ...
 
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
[Vietnam Mobile Day 2014] Mobile kết nối thế giới số và thế giới thực và vai ...
 
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
[Vietnam Mobile Day 2014] The new mobile marketing channel: Social Wifi Marke...
 
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
[Vietnam Mobile Day 2014] Cá nhân hóa và xác định Khách hàng mục tiêu trong q...
 
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
[Vietnam Mobile Day 2014] Chiến lược thu hút người dùng cho ứng dụng tại thị ...
 
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
[Vietnam Mobile Day 2014] Thanh toán mobile, hiện tại và xu hướng- Nguyễn Chi...
 
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
[Vietnam Mobile Day 2014] Thanh toán bằng thẻ ngân hàng trên mobile chưa bao ...
 
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - Ng...
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - 	 Ng...[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - 	 Ng...
[Vietnam Mobile Day 2014] How to build a mobile store app in 5 minutes - Ng...
 
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
[Vietnam Mobile Day 2014] Touch the future of the web - Nguyễn Việt Anh - Cou...
 
[Vietnam Mobile Day 2014] Xu hướng trong Mobile Learning, 2014 - Nguyễn Thàn...
[Vietnam Mobile Day 2014] Xu hướng trong Mobile Learning, 2014  - Nguyễn Thàn...[Vietnam Mobile Day 2014] Xu hướng trong Mobile Learning, 2014  - Nguyễn Thàn...
[Vietnam Mobile Day 2014] Xu hướng trong Mobile Learning, 2014 - Nguyễn Thàn...
 
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
 
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
[Vietnam Mobile Day 2014] Toàn cảnh thị trường game smartphone Việt Nam 2013....
 

Recently uploaded

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

[Vietnam Mobile Day 2013] - tối ưu hóa cho mobile json, bộ nhớ và tương tác

  • 1. JSON, Memory Usage & Interaction Design Experience in Boosting Performance for an iOS / Android Application Lucas Nguyen VINOVA Pte. Ltd. info@vinova.sg
  • 2. About VINOVA •  Vinova = Vibrant Innovators –  iOS / Android / Windows Phone –  For Singapore Enterprises & Organizations •  2010 Founded in Singapore •  2011 Representative Office in Hanoi •  2012+ Push for Mobile Game
  • 3. About ME •  Lead Mobile Developer at VINOVA •  3-year experience on Native iOS, Android, and Cross-Platform Technologies •  Backend Web Services using Ruby on Rails Lucas Nguyen  
  • 4. Great Client Singapore Press Holdings (SPH) - 
 Southeast Asia’s Leading Media Organization
  • 5. Big PROJECT •  Straits Times Online Mobile Print (STOMP) •  Award-winning website & mobile app •  Singaporean connecting, engaging and interacting •  0.5m concurrent users at peak hours •  1.8m page-views per day
  • 6. MISSION Revamp a very popular iOS & Android app to serve end-users better, faster! STOMP v1 STOMP v2
  • 8. New version Challenges: •  Complex Design •  Lots of Advertisement Banners •  Old, Slow & Heavy APIs (14.7MB of XML in total)
  • 9. 1-Star Rating User Complains Client’s Dissatisfaction App Crashes & Hangs When We Took Over The Project
  • 10. What Did We Think? F i n d       t h e         s o l u t i o n  
  • 11. How Did We Solve The Problem? 1 2 3
  • 12. XML to JSON Conversion •  Heavy •  Slow •  Uncontrolled •  Light •  Fast •  Controlled Lightning Server
  • 13. Remove reduntdant data •  Full image URLs? NO! •  Just need [id] and [token] to regenerate the URL –  thumbnail: http://dswww.stomp.com.sg/site/servlet/ iphone/photo?photoId=#{id} –  image: http://static.stomp.com.sg/site/servlet/ linkableblob/stomp/#{id}/data/#{token}-data.jpg {! id: "1668324” ! title: ”Butter Factory’s…”,! thumbnails: […],! images: […]! }!
  • 14. JSON Optimization Article items: •  Small •  A lot •  Need to parse first! à Keep raw Article detail: •  Big •  Need one at a time •  Have more time to parse
 à Gzip to binary à Encode base64
  • 15. Our JSON format •  Primary data for main screen (categories & articles listing) •  Secondary data for article detail screen {! id: "1668324” ! title: ”Butter Factory’s…”,! }! "eNp1VF2v2zYM/SuEnzYgTfz90bcVaDdcoN...“   {! "date" => "26 Mar 2013",! "views" => "16160",! "comments" => "53",! "content" => ”A 61-year-old retiree…”,! "photos" => [...]! }! Unpacked
  • 16. Best compression method Format   Size  (MB)   %  Remaining    Raw  XML   14.7  MB   100%   (1)  Compact  JSON   6.0  MB   40%   (2)  Compressed  &  Compact  JSON   3.8  MB   25%   (3)  Compressed  &  Compact  BSON   2.9  MB   20%   Best of both worlds: •  ¼ size reduced •  Easy to read •  Easy to decode with popular libs •  Much Faster & Lighter APIs •  Easier to scale (using CDN) •  Smaller Mobile Memory Usage
  • 17. Watch Out for Memory Usage Memory Usage
  • 18. Memory Allocation 100  MB     20  MB   using allocate 10  MB   using allocate 20  MB   Before   AHer  
  • 19. Load remote data one-by-one If load 3 ~ 5 categories at the same time à Allocate 10MB ~ 25MB simutaneously à Memory Warning
  • 20. Release memory allocated for off-screen list items Smartphone’s screen is small à  No need to show more than 5 categories at once à  Release all invisible components to reduce memory usage 1 2 3 4 5
  • 21. Photos are dangrous, just like girls •  Only load visible photos! •  Large photo is beautiful, but: –  Take more bandwidth –  Take more memory & GPU to render Photos Quan9ty Avg.  Size Memory  Usage high res. 20  ~  24 ~30KB 10MB  ~  15MB low res. 20  ~  24 ~05KB 03MB  ~  04MB
  • 22. ad banners take LotS of memory 1MB  Image   +   memory  for  Views  
  • 23. Interaction DesiGn Don’t Follow the Design Strictly
  • 24. One mission per screen One  big  screen:   ArTcle  +  Comments   ArTcle   Comments   Separate   •  Not everyone needs to see comments •  Better UX •  Lighter UI
  • 25. User is touching, not clicking, make it easy •  Original designed button is small 
 à hard to see and touch •  Make it wider! Original Wider
  • 26. Test on low-end devices iPhone-5 iPhone-4S iPhone-4 iPhone-3GS 1GB 512 MB 512 MB 256 MB Dual-core 1.2 GHz Dual-core 1 GHz 1 GHz 600 MHz
  • 27. Don’t Believe in Anything ... •  No assumptions •  Update 3rd party libraries usually •  APIs won’t work 100% •  Handle exceptions
  • 30. Vibrant Innovators Những người đổi mới đầy nhiệt huyết