SlideShare a Scribd company logo
1 of 13
24.April 2013
Work
But, isn’t webview slow?
Android behavior is particularly problematic.
Optimization of animation.
Optimization of transmission rate.
Optimization of CreateJS.
Pokelabo’s fixes
Copyright © POKELABO.inc All Rights Reserved.Confidential
Optimization of animation
・We don't use the canvas for everything.
Parts with little movement, including backgrounds and
the status bar are done by html and css animation.
・We avoid resizing images as much as possible.
・We don’t use Hardware Acceleration in Android ver.3+.
・We don’t start Garbage collector (gc) in an animation.
・We call the native garbage collector when the animation stops.
・We put the header and footer in different webviews.
・We don’t use iScroll.
・jQuery is heavy. So we use light libraries including zepto.
Copyright © POKELABO.inc All Rights Reserved.Confidential
Optimization of transmission rate
・Processing that takes time shouldn’t happen in the UI thread.
・Caching and sharding.
・Image file packaging.
・Cache of Animation resource.
(Changing parts are excluded dynamically)
・Use of concat, minify, gzip of js, css.
Copyright © POKELABO.inc All Rights Reserved.Confidential
Optimization of CreateJS
・We always round decimal places.
・We don’t use many tweens.
・Set the frame rate to 12.
・We reduce the number of layers.
・We don’t use layer hierarchies deeper than about three layers.
・We lower the quality of images used in canvas.
Copyright © POKELABO.inc All Rights Reserved.Confidential
But, isn’t webview slow?
Now under development
Copyright © POKELABO.inc All Rights Reserved.Confidential
Copyright © POKELABO.inc All Rights Reserved.Confidential
Mission
To fulfill it, we must perform four missions
1. Surprise our coworkers.
2. Surprise our rival businesses.
3. Surprise the user.
4. Surprise the people all over the world.
Copyright © POKELABO.inc All Rights Reserved.Confidential Copyright © 2004-2007 GREE,Inc. All Rights Reserved.Copyright © POKELABO.inc All Rights Reserved.Confidential
Thank You!

More Related Content

What's hot

WebRender (MadRust)
WebRender (MadRust)WebRender (MadRust)
WebRender (MadRust)Igalia
 
Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Alvaro Soto
 
Wp7 performance challenges
Wp7 performance challengesWp7 performance challenges
Wp7 performance challengesGergely Orosz
 
AWS Lambda with ClaudiaJS
AWS Lambda with ClaudiaJSAWS Lambda with ClaudiaJS
AWS Lambda with ClaudiaJSRiza Fahmi
 
mastodon API
mastodon APImastodon API
mastodon APItreby
 
Scotland JS 2016 Keynote: The VR Web and the Future of the Browser
Scotland JS 2016 Keynote: The VR Web and the Future of the BrowserScotland JS 2016 Keynote: The VR Web and the Future of the Browser
Scotland JS 2016 Keynote: The VR Web and the Future of the BrowserLiv Erickson
 
Ember.js internals backburner.js and rsvp.js
Ember.js internals  backburner.js and rsvp.jsEmber.js internals  backburner.js and rsvp.js
Ember.js internals backburner.js and rsvp.jsgavinjoyce
 
Make your animations perform well
Make your animations perform wellMake your animations perform well
Make your animations perform wellAnna Migas
 
Azure SQL, Blobs and ATS
Azure SQL, Blobs and ATSAzure SQL, Blobs and ATS
Azure SQL, Blobs and ATSAnkit Kashyap
 
Getting Started with Web VR
Getting Started with Web VR Getting Started with Web VR
Getting Started with Web VR Saurabh Badhwar
 
Build your own RasPiTV with Node.js & Socket.io
Build your own RasPiTV with Node.js & Socket.ioBuild your own RasPiTV with Node.js & Socket.io
Build your own RasPiTV with Node.js & Socket.ioDonald Derek Haddad
 
Getting Started With AngularJS
Getting Started With AngularJSGetting Started With AngularJS
Getting Started With AngularJSOmnia Helmi
 
capify all
capify allcapify all
capify allrch850 -
 
Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2Hamidreza Soleimani
 
Artem Zhurbila - Some ways to set up the server (highload strategy meetup lig...
Artem Zhurbila - Some ways to set up the server (highload strategy meetup lig...Artem Zhurbila - Some ways to set up the server (highload strategy meetup lig...
Artem Zhurbila - Some ways to set up the server (highload strategy meetup lig...Artem Zhurbila
 

What's hot (20)

WebRender (MadRust)
WebRender (MadRust)WebRender (MadRust)
WebRender (MadRust)
 
Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016
 
Wp7 performance challenges
Wp7 performance challengesWp7 performance challenges
Wp7 performance challenges
 
Web Vector Graphics
Web Vector GraphicsWeb Vector Graphics
Web Vector Graphics
 
AWS Lambda with ClaudiaJS
AWS Lambda with ClaudiaJSAWS Lambda with ClaudiaJS
AWS Lambda with ClaudiaJS
 
ingatlan.com goes mobile
ingatlan.com goes mobileingatlan.com goes mobile
ingatlan.com goes mobile
 
mastodon API
mastodon APImastodon API
mastodon API
 
Scotland JS 2016 Keynote: The VR Web and the Future of the Browser
Scotland JS 2016 Keynote: The VR Web and the Future of the BrowserScotland JS 2016 Keynote: The VR Web and the Future of the Browser
Scotland JS 2016 Keynote: The VR Web and the Future of the Browser
 
Ember.js internals backburner.js and rsvp.js
Ember.js internals  backburner.js and rsvp.jsEmber.js internals  backburner.js and rsvp.js
Ember.js internals backburner.js and rsvp.js
 
Make your animations perform well
Make your animations perform wellMake your animations perform well
Make your animations perform well
 
Azure SQL, Blobs and ATS
Azure SQL, Blobs and ATSAzure SQL, Blobs and ATS
Azure SQL, Blobs and ATS
 
Getting Started with Web VR
Getting Started with Web VR Getting Started with Web VR
Getting Started with Web VR
 
Web vr creative_vr
Web vr creative_vrWeb vr creative_vr
Web vr creative_vr
 
Build your own RasPiTV with Node.js & Socket.io
Build your own RasPiTV with Node.js & Socket.ioBuild your own RasPiTV with Node.js & Socket.io
Build your own RasPiTV with Node.js & Socket.io
 
Getting Started With AngularJS
Getting Started With AngularJSGetting Started With AngularJS
Getting Started With AngularJS
 
Node
NodeNode
Node
 
capify all
capify allcapify all
capify all
 
Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2Event Driven Architecture Concepts in Web Technologies - Part 2
Event Driven Architecture Concepts in Web Technologies - Part 2
 
Artem Zhurbila - Some ways to set up the server (highload strategy meetup lig...
Artem Zhurbila - Some ways to set up the server (highload strategy meetup lig...Artem Zhurbila - Some ways to set up the server (highload strategy meetup lig...
Artem Zhurbila - Some ways to set up the server (highload strategy meetup lig...
 
Automate devmachinesetup
Automate devmachinesetupAutomate devmachinesetup
Automate devmachinesetup
 

Similar to Webview Optimization Techniques

Deliver Perfect Images At Any Size
Deliver Perfect Images At Any SizeDeliver Perfect Images At Any Size
Deliver Perfect Images At Any SizeFITC
 
Deliver perfect images at any size
Deliver perfect images at any sizeDeliver perfect images at any size
Deliver perfect images at any sizeAnne Thomas
 
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...Learnosity
 
Motion design in FIori
Motion design in FIoriMotion design in FIori
Motion design in FIoriRoman Rommel
 
Why your Android Apps Suck
Why your Android Apps SuckWhy your Android Apps Suck
Why your Android Apps Suckrogeryi
 
Make your animations perform well - Anna Migas - Codemotion Rome 2017
Make your animations perform well - Anna Migas - Codemotion Rome 2017Make your animations perform well - Anna Migas - Codemotion Rome 2017
Make your animations perform well - Anna Migas - Codemotion Rome 2017Codemotion
 
Webapp Rendering and Optimization.
Webapp Rendering and Optimization.Webapp Rendering and Optimization.
Webapp Rendering and Optimization.arthurjamain
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowWordPress
 
Web Policies & Reporting
Web Policies & ReportingWeb Policies & Reporting
Web Policies & ReportingFelix Arntz
 
Performance and Memory Tuning - Part III - Transcript.pdf
Performance and Memory Tuning - Part III - Transcript.pdfPerformance and Memory Tuning - Part III - Transcript.pdf
Performance and Memory Tuning - Part III - Transcript.pdfShaiAlmog1
 
IntoWebGL - Unite Melbourne 2015
IntoWebGL - Unite Melbourne 2015IntoWebGL - Unite Melbourne 2015
IntoWebGL - Unite Melbourne 2015Ryan Alcock
 
Edi ux fastandbeautiful
Edi ux fastandbeautifulEdi ux fastandbeautiful
Edi ux fastandbeautifulDoug Sillars
 
Advanced Imaging on iOS
Advanced Imaging on iOSAdvanced Imaging on iOS
Advanced Imaging on iOSrsebbe
 
Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Anna Migas
 
Animations on Fire - Making Web animations fast
Animations on Fire - Making Web animations fastAnimations on Fire - Making Web animations fast
Animations on Fire - Making Web animations fastbrianskold
 
Running HTML5 Mobile Web Games at 60fps
Running HTML5 Mobile Web Games at 60fpsRunning HTML5 Mobile Web Games at 60fps
Running HTML5 Mobile Web Games at 60fpsApoorv Saxena
 
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)
From nothing to a video under 2 seconds / Mikhail Sychev  (YouTube)From nothing to a video under 2 seconds / Mikhail Sychev  (YouTube)
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)Ontico
 
Smooth Animations for Web & Hybrid
Smooth Animations for Web & HybridSmooth Animations for Web & Hybrid
Smooth Animations for Web & HybridFITC
 

Similar to Webview Optimization Techniques (20)

Deliver Perfect Images At Any Size
Deliver Perfect Images At Any SizeDeliver Perfect Images At Any Size
Deliver Perfect Images At Any Size
 
Deliver perfect images at any size
Deliver perfect images at any sizeDeliver perfect images at any size
Deliver perfect images at any size
 
imgproxy is amazing
imgproxy is amazingimgproxy is amazing
imgproxy is amazing
 
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
 
Motion design in FIori
Motion design in FIoriMotion design in FIori
Motion design in FIori
 
Why your Android Apps Suck
Why your Android Apps SuckWhy your Android Apps Suck
Why your Android Apps Suck
 
Make your animations perform well - Anna Migas - Codemotion Rome 2017
Make your animations perform well - Anna Migas - Codemotion Rome 2017Make your animations perform well - Anna Migas - Codemotion Rome 2017
Make your animations perform well - Anna Migas - Codemotion Rome 2017
 
Webapp Rendering and Optimization.
Webapp Rendering and Optimization.Webapp Rendering and Optimization.
Webapp Rendering and Optimization.
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
 
Web Policies & Reporting
Web Policies & ReportingWeb Policies & Reporting
Web Policies & Reporting
 
Performance and Memory Tuning - Part III - Transcript.pdf
Performance and Memory Tuning - Part III - Transcript.pdfPerformance and Memory Tuning - Part III - Transcript.pdf
Performance and Memory Tuning - Part III - Transcript.pdf
 
IntoWebGL - Unite Melbourne 2015
IntoWebGL - Unite Melbourne 2015IntoWebGL - Unite Melbourne 2015
IntoWebGL - Unite Melbourne 2015
 
Edi ux fastandbeautiful
Edi ux fastandbeautifulEdi ux fastandbeautiful
Edi ux fastandbeautiful
 
Advanced Imaging on iOS
Advanced Imaging on iOSAdvanced Imaging on iOS
Advanced Imaging on iOS
 
Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017
 
Animations on Fire - Making Web animations fast
Animations on Fire - Making Web animations fastAnimations on Fire - Making Web animations fast
Animations on Fire - Making Web animations fast
 
Running HTML5 Mobile Web Games at 60fps
Running HTML5 Mobile Web Games at 60fpsRunning HTML5 Mobile Web Games at 60fps
Running HTML5 Mobile Web Games at 60fps
 
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)
From nothing to a video under 2 seconds / Mikhail Sychev  (YouTube)From nothing to a video under 2 seconds / Mikhail Sychev  (YouTube)
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)
 
Smooth Animations for Web & Hybrid
Smooth Animations for Web & HybridSmooth Animations for Web & Hybrid
Smooth Animations for Web & Hybrid
 
Presentation on Fresco
Presentation on FrescoPresentation on Fresco
Presentation on Fresco
 

More from Shota Suzuki

変化し続けるリアル空間 - リアルとデジタルの融合 -
変化し続けるリアル空間 - リアルとデジタルの融合 - 変化し続けるリアル空間 - リアルとデジタルの融合 -
変化し続けるリアル空間 - リアルとデジタルの融合 - Shota Suzuki
 
Unity外注発注改善
Unity外注発注改善Unity外注発注改善
Unity外注発注改善Shota Suzuki
 
ハコスコとUIと時々、ご飯
ハコスコとUIと時々、ご飯ハコスコとUIと時々、ご飯
ハコスコとUIと時々、ご飯Shota Suzuki
 
ゲームジャンル
ゲームジャンルゲームジャンル
ゲームジャンルShota Suzuki
 
ハイブリットソーシャルゲームの現場
ハイブリットソーシャルゲームの現場ハイブリットソーシャルゲームの現場
ハイブリットソーシャルゲームの現場Shota Suzuki
 

More from Shota Suzuki (7)

変化し続けるリアル空間 - リアルとデジタルの融合 -
変化し続けるリアル空間 - リアルとデジタルの融合 - 変化し続けるリアル空間 - リアルとデジタルの融合 -
変化し続けるリアル空間 - リアルとデジタルの融合 -
 
Unity外注発注改善
Unity外注発注改善Unity外注発注改善
Unity外注発注改善
 
ハコスコとUIと時々、ご飯
ハコスコとUIと時々、ご飯ハコスコとUIと時々、ご飯
ハコスコとUIと時々、ご飯
 
Flash 2011
Flash 2011Flash 2011
Flash 2011
 
ゲームジャンル
ゲームジャンルゲームジャンル
ゲームジャンル
 
ハイブリットソーシャルゲームの現場
ハイブリットソーシャルゲームの現場ハイブリットソーシャルゲームの現場
ハイブリットソーシャルゲームの現場
 
Yakyutomo
YakyutomoYakyutomo
Yakyutomo
 

Webview Optimization Techniques

  • 4. Android behavior is particularly problematic.
  • 5. Optimization of animation. Optimization of transmission rate. Optimization of CreateJS. Pokelabo’s fixes
  • 6. Copyright © POKELABO.inc All Rights Reserved.Confidential Optimization of animation ・We don't use the canvas for everything. Parts with little movement, including backgrounds and the status bar are done by html and css animation. ・We avoid resizing images as much as possible. ・We don’t use Hardware Acceleration in Android ver.3+. ・We don’t start Garbage collector (gc) in an animation. ・We call the native garbage collector when the animation stops. ・We put the header and footer in different webviews. ・We don’t use iScroll. ・jQuery is heavy. So we use light libraries including zepto.
  • 7. Copyright © POKELABO.inc All Rights Reserved.Confidential Optimization of transmission rate ・Processing that takes time shouldn’t happen in the UI thread. ・Caching and sharding. ・Image file packaging. ・Cache of Animation resource. (Changing parts are excluded dynamically) ・Use of concat, minify, gzip of js, css.
  • 8. Copyright © POKELABO.inc All Rights Reserved.Confidential Optimization of CreateJS ・We always round decimal places. ・We don’t use many tweens. ・Set the frame rate to 12. ・We reduce the number of layers. ・We don’t use layer hierarchies deeper than about three layers. ・We lower the quality of images used in canvas.
  • 9. Copyright © POKELABO.inc All Rights Reserved.Confidential But, isn’t webview slow?
  • 11. Copyright © POKELABO.inc All Rights Reserved.Confidential
  • 12. Copyright © POKELABO.inc All Rights Reserved.Confidential Mission To fulfill it, we must perform four missions 1. Surprise our coworkers. 2. Surprise our rival businesses. 3. Surprise the user. 4. Surprise the people all over the world.
  • 13. Copyright © POKELABO.inc All Rights Reserved.Confidential Copyright © 2004-2007 GREE,Inc. All Rights Reserved.Copyright © POKELABO.inc All Rights Reserved.Confidential Thank You!

Editor's Notes

  1. But, isn’t webview slow?
  2. Yes, that is also a challenge for us. It’s no problem for iPhone, But Android behavior is particularly problematic.
  3. We fix this problem as follows. //Optimization of animation. //Optimization of transmission rate. //Optimization of CreateJS.
  4. First, Optimization of animation Optimization measures in pokelabo are as follows. We have a lot of plans for improvement. So I printed a separate document with the details. You can look at it at your convenience. If you have any other ideas for improvement, please tell me. ◇アニメーションの最適化 ・全てcanvasにはせず、背景やステータスバーなど 動きの少ない部分はhtmlとcss animation 使う ・リサイズはできる限りしない ・3系以上でハードウェアアクセレーションを切る ・アニメーション中にガベージコレクタ(gc)が起動しないよう、 アニメーションが停止するタイミングでネイティブのgcをコールする ・ヘッダーフッターを別のwebviewにする ・iScrollを使用しない。 ・jQueryは重いのでzeptoなど軽いライブラリーを使う
  5. Second, Optimization of transmission rate We have to be careful about making our animations too complicated, because they become heavy. One of the biggest reasons that a user will stop playing a game is because loading is slow. So It is a very important thing to pokelabo. 演出を派手にすればするほど処理が重くなるので気を付けないといけません。 ユーザーがゲームをやめてしまうポイントの一つにローディングが遅いというものがあります。 ここに載っていることはポケラボではとても重要です ◇通信速度の最適化 全ての画像のダウンロードを一回だけにする。 ・時間のかかる処理はUIスレッドではやらない ・シャーディングとキャッシュ化 ・画像をネイティブに組み込んで置く ・演出とリソースのキャッシュ化(動的に変化するもの以外) ・js,cssのconcat,minify,gzipを使う
  6. And finaly, Optimization of CreateJS It is improved little by little, by steady correction. Our problem is that animations made for Android look weak on iPhone. 地道な修正で少しずつ改善されます。 私達の悩みとしては、Androidに合わせてアニメーションを作ると、iPhoneでロークオリティになる ◇createjs ・小数点を消す ・トゥイーンを多用しない ・フレームレート12 ・レイヤーの数を減らす ・レイヤー階層を深くしない。(2階層くらいに) ・canvasに使用している画質を落とす
  7. But, isn’t webview slow?