SlideShare a Scribd company logo
1 of 31
Download to read offline
Performance & Memory Tuning - Part I
How This Module Is Structured
© Codename One 2017 all rights reserved
✦Performance Tips
How This Module Is Structured
© Codename One 2017 all rights reserved
✦Performance Tips
✦Root causes (profiling)
How This Module Is Structured
© Codename One 2017 all rights reserved
✦Performance Tips
✦Root causes (profiling)
✦Real World Example
What is Performance?
© Codename One 2017 all rights reserved
What is Performance?
© Codename One 2017 all rights reserved
✦Rendering Performance
✦Logic Performance
✦Memory Thrashing & Crashes
✦Perceived Performance
✦Pareto distribution
Rendering Performance
© Codename One 2017 all rights reserved
✦Framerate
Rendering Performance
© Codename One 2017 all rights reserved
✦Framerate
✦Feels less smooth
Rendering Performance
© Codename One 2017 all rights reserved
✦Framerate
✦Feels less smooth
✦Animations & scrolling feel jumpy
Rendering Performance
© Codename One 2017 all rights reserved
✦Framerate
✦Feels less smooth
✦Animations & scrolling feel jumpy
✦Small issues
Rendering Performance
© Codename One 2017 all rights reserved
✦Framerate
✦Feels less smooth
✦Animations & scrolling feel jumpy
✦Small issues
✦Need to render a frame within 16 milliseconds for 60fps
Logic Performance
© Codename One 2017 all rights reserved
✦More common than rendering performance
Logic Performance
© Codename One 2017 all rights reserved
✦More common than rendering performance
✦CPU Starvation
Logic Performance
© Codename One 2017 all rights reserved
✦More common than rendering performance
✦CPU Starvation
✦Causes delay/bounce - not uniform impact
Logic Performance
© Codename One 2017 all rights reserved
✦More common than rendering performance
✦CPU Starvation
✦Causes delay/bounce - not uniform impact
✦Use caching/threading effectively to solve
Memory Thrashing & Crashes
© Codename One 2017 all rights reserved
✦GC Thrashing - rapid alloc/discard
Memory Thrashing & Crashes
© Codename One 2017 all rights reserved
✦GC Thrashing - rapid alloc/discard
✦Cache clearance
Perceived Performance
© Codename One 2017 all rights reserved
✦Experiment:
Perceived Performance
© Codename One 2017 all rights reserved
✦Experiment:
✓ Show a button after 1 second delay with no indication
Perceived Performance
© Codename One 2017 all rights reserved
✦Experiment:
✓ Show a button after 1 second delay with no indication
✓ Do the same with 2 seconds delay but write
“Loading…” on the button after the tap
Perceived Performance
© Codename One 2017 all rights reserved
✦Experiment:
✓ Show a button after 1 second delay with no indication
✓ Do the same with 2 seconds delay but write
“Loading…” on the button after the tap
✦The second version feels more responsive
Perceived Performance
© Codename One 2017 all rights reserved
✦Experiment:
✓ Show a button after 1 second delay with no indication
✓ Do the same with 2 seconds delay but write
“Loading…” on the button after the tap
✦The second version feels more responsive
✦Try to avoid InfiniteProgress, try to show cached data
and update in the background
Perceived Performance
© Codename One 2017 all rights reserved
✦Experiment:
✓ Show a button after 1 second delay with no indication
✓ Do the same with 2 seconds delay but write
“Loading…” on the button after the tap
✦The second version feels more responsive
✦Try to avoid InfiniteProgress, try to show cached data
and update in the background
✦This is probably the most common reason for end user
performance complaints!
Pareto Distribution: the 80-20 Rule
© Codename One 2017 all rights reserved
Pareto Distribution: the 80-20 Rule
© Codename One 2017 all rights reserved
The real problem is that programmers have
spent far too much time worrying about
efficiency in the wrong places and at the wrong
times; premature optimization is the root of all
evil (or at least most of it) in programming
Pareto Distribution: the 80-20 Rule
© Codename One 2017 all rights reserved
The real problem is that programmers have
spent far too much time worrying about
efficiency in the wrong places and at the wrong
times; premature optimization is the root of all
evil (or at least most of it) in programming
Pareto Distribution: the 80-20 Rule
© Codename One 2017 all rights reserved
The real problem is that programmers have
spent far too much time worrying about
efficiency in the wrong places and at the wrong
times; premature optimization is the root of all
evil (or at least most of it) in programming
Donald Knuth
Pareto Distribution: the 80-20 Rule
© Codename One 2017 all rights reserved
The real problem is that programmers have
spent far too much time worrying about
efficiency in the wrong places and at the wrong
times; premature optimization is the root of all
evil (or at least most of it) in programming
Donald Knuth
“
Pareto Distribution: the 80-20 Rule
© Codename One 2017 all rights reserved
✦When you spend time optimizing at an early stage you
will have an unmaintainable app
Pareto Distribution: the 80-20 Rule
© Codename One 2017 all rights reserved
✦When you spend time optimizing at an early stage you
will have an unmaintainable app
✦Caching is key
Pareto Distribution: the 80-20 Rule
© Codename One 2017 all rights reserved
✦When you spend time optimizing at an early stage you
will have an unmaintainable app
✦Caching is key
✦In my experience performance is more of a 98% - 2%
rule

More Related Content

Similar to Performance and Memory Tuning - Part I - Transcript.pdf

Business Success With Core Web Vitals | Izzi Smith
Business Success With Core Web Vitals | Izzi SmithBusiness Success With Core Web Vitals | Izzi Smith
Business Success With Core Web Vitals | Izzi SmithNoisy Little Monkey
 
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech TalksLife of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech TalksAmazon Web Services
 
How do I - Use Include Source to debug native code.pdf
How do I - Use Include Source to debug native code.pdfHow do I - Use Include Source to debug native code.pdf
How do I - Use Include Source to debug native code.pdfShaiAlmog1
 
AI Based Test Automation Without AI
AI Based Test Automation Without AIAI Based Test Automation Without AI
AI Based Test Automation Without AIXBOSoft
 
Shift-left SRE: Self-healing on OpenShift with Ansible
Shift-left SRE: Self-healing on OpenShift with AnsibleShift-left SRE: Self-healing on OpenShift with Ansible
Shift-left SRE: Self-healing on OpenShift with AnsibleJürgen Etzlstorfer
 
Business Success with Core Web Vitals
Business Success with Core Web VitalsBusiness Success with Core Web Vitals
Business Success with Core Web VitalsIzzi Smith
 
What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?Rogue Wave Software
 
NEW LAUNCH! Building Virtual Reality and Augmented Reality Applications with ...
NEW LAUNCH! Building Virtual Reality and Augmented Reality Applications with ...NEW LAUNCH! Building Virtual Reality and Augmented Reality Applications with ...
NEW LAUNCH! Building Virtual Reality and Augmented Reality Applications with ...Amazon Web Services
 
LESSONS LEARNED FROM ADOBE’S PERFORMANCE MANAGEMENT REVOLUTION
LESSONS LEARNED FROM ADOBE’S PERFORMANCE MANAGEMENT REVOLUTIONLESSONS LEARNED FROM ADOBE’S PERFORMANCE MANAGEMENT REVOLUTION
LESSONS LEARNED FROM ADOBE’S PERFORMANCE MANAGEMENT REVOLUTIONHuman Capital Media
 
Jun Heider - Flex Application Profiling By Example
Jun Heider - Flex Application Profiling By ExampleJun Heider - Flex Application Profiling By Example
Jun Heider - Flex Application Profiling By Example360|Conferences
 
Advertising Insights through Segmented Analytics - Adobe Summit 2017
Advertising Insights through Segmented Analytics  - Adobe Summit 2017Advertising Insights through Segmented Analytics  - Adobe Summit 2017
Advertising Insights through Segmented Analytics - Adobe Summit 2017Chris Haleua
 
re:Invent CON320 Tracing and Debugging for Containerized Services
re:Invent CON320 Tracing and Debugging for Containerized Servicesre:Invent CON320 Tracing and Debugging for Containerized Services
re:Invent CON320 Tracing and Debugging for Containerized ServicesCalvin French-Owen
 
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...Amazon Web Services
 
加速するデータドリブンコミュニケーション
加速するデータドリブンコミュニケーション加速するデータドリブンコミュニケーション
加速するデータドリブンコミュニケーションKeisuke Anzai
 
プロトタイプでWeb制作の手戻りを減らせ!アドビ初のUI/UXデザインツール、Adobe XDのススメ
プロトタイプでWeb制作の手戻りを減らせ!アドビ初のUI/UXデザインツール、Adobe XDのススメプロトタイプでWeb制作の手戻りを減らせ!アドビ初のUI/UXデザインツール、Adobe XDのススメ
プロトタイプでWeb制作の手戻りを減らせ!アドビ初のUI/UXデザインツール、Adobe XDのススメKeisuke Todoroki
 
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...Amazon Web Services
 

Similar to Performance and Memory Tuning - Part I - Transcript.pdf (20)

Business Success With Core Web Vitals | Izzi Smith
Business Success With Core Web Vitals | Izzi SmithBusiness Success With Core Web Vitals | Izzi Smith
Business Success With Core Web Vitals | Izzi Smith
 
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech TalksLife of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
 
How do I - Use Include Source to debug native code.pdf
How do I - Use Include Source to debug native code.pdfHow do I - Use Include Source to debug native code.pdf
How do I - Use Include Source to debug native code.pdf
 
AI Based Test Automation Without AI
AI Based Test Automation Without AIAI Based Test Automation Without AI
AI Based Test Automation Without AI
 
Shift-left SRE: Self-healing on OpenShift with Ansible
Shift-left SRE: Self-healing on OpenShift with AnsibleShift-left SRE: Self-healing on OpenShift with Ansible
Shift-left SRE: Self-healing on OpenShift with Ansible
 
Business Success with Core Web Vitals
Business Success with Core Web VitalsBusiness Success with Core Web Vitals
Business Success with Core Web Vitals
 
What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?
 
Visual testing
Visual testingVisual testing
Visual testing
 
NEW LAUNCH! Building Virtual Reality and Augmented Reality Applications with ...
NEW LAUNCH! Building Virtual Reality and Augmented Reality Applications with ...NEW LAUNCH! Building Virtual Reality and Augmented Reality Applications with ...
NEW LAUNCH! Building Virtual Reality and Augmented Reality Applications with ...
 
LESSONS LEARNED FROM ADOBE’S PERFORMANCE MANAGEMENT REVOLUTION
LESSONS LEARNED FROM ADOBE’S PERFORMANCE MANAGEMENT REVOLUTIONLESSONS LEARNED FROM ADOBE’S PERFORMANCE MANAGEMENT REVOLUTION
LESSONS LEARNED FROM ADOBE’S PERFORMANCE MANAGEMENT REVOLUTION
 
Webinar-DevOps.pdf
Webinar-DevOps.pdfWebinar-DevOps.pdf
Webinar-DevOps.pdf
 
Your Flight is Boarding Now!
Your Flight is Boarding Now!Your Flight is Boarding Now!
Your Flight is Boarding Now!
 
Jun Heider - Flex Application Profiling By Example
Jun Heider - Flex Application Profiling By ExampleJun Heider - Flex Application Profiling By Example
Jun Heider - Flex Application Profiling By Example
 
Advertising Insights through Segmented Analytics - Adobe Summit 2017
Advertising Insights through Segmented Analytics  - Adobe Summit 2017Advertising Insights through Segmented Analytics  - Adobe Summit 2017
Advertising Insights through Segmented Analytics - Adobe Summit 2017
 
re:Invent CON320 Tracing and Debugging for Containerized Services
re:Invent CON320 Tracing and Debugging for Containerized Servicesre:Invent CON320 Tracing and Debugging for Containerized Services
re:Invent CON320 Tracing and Debugging for Containerized Services
 
DevOps Culture at Amazon
DevOps Culture at AmazonDevOps Culture at Amazon
DevOps Culture at Amazon
 
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
 
加速するデータドリブンコミュニケーション
加速するデータドリブンコミュニケーション加速するデータドリブンコミュニケーション
加速するデータドリブンコミュニケーション
 
プロトタイプでWeb制作の手戻りを減らせ!アドビ初のUI/UXデザインツール、Adobe XDのススメ
プロトタイプでWeb制作の手戻りを減らせ!アドビ初のUI/UXデザインツール、Adobe XDのススメプロトタイプでWeb制作の手戻りを減らせ!アドビ初のUI/UXデザインツール、Adobe XDのススメ
プロトタイプでWeb制作の手戻りを減らせ!アドビ初のUI/UXデザインツール、Adobe XDのススメ
 
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
From Monolith to Microservices (And All the Bumps along the Way) (CON360-R1) ...
 

More from ShaiAlmog1

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...ShaiAlmog1
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfShaiAlmog1
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfShaiAlmog1
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfShaiAlmog1
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfShaiAlmog1
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfShaiAlmog1
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfShaiAlmog1
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfShaiAlmog1
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfShaiAlmog1
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfShaiAlmog1
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfShaiAlmog1
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfShaiAlmog1
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfShaiAlmog1
 

More from ShaiAlmog1 (20)

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdf
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdf
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdf
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdf
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdf
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdf
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdf
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdf
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdf
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdf
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
 

Recently uploaded

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 

Performance and Memory Tuning - Part I - Transcript.pdf

  • 1. Performance & Memory Tuning - Part I
  • 2. How This Module Is Structured © Codename One 2017 all rights reserved ✦Performance Tips
  • 3. How This Module Is Structured © Codename One 2017 all rights reserved ✦Performance Tips ✦Root causes (profiling)
  • 4. How This Module Is Structured © Codename One 2017 all rights reserved ✦Performance Tips ✦Root causes (profiling) ✦Real World Example
  • 5. What is Performance? © Codename One 2017 all rights reserved
  • 6. What is Performance? © Codename One 2017 all rights reserved ✦Rendering Performance ✦Logic Performance ✦Memory Thrashing & Crashes ✦Perceived Performance ✦Pareto distribution
  • 7. Rendering Performance © Codename One 2017 all rights reserved ✦Framerate
  • 8. Rendering Performance © Codename One 2017 all rights reserved ✦Framerate ✦Feels less smooth
  • 9. Rendering Performance © Codename One 2017 all rights reserved ✦Framerate ✦Feels less smooth ✦Animations & scrolling feel jumpy
  • 10. Rendering Performance © Codename One 2017 all rights reserved ✦Framerate ✦Feels less smooth ✦Animations & scrolling feel jumpy ✦Small issues
  • 11. Rendering Performance © Codename One 2017 all rights reserved ✦Framerate ✦Feels less smooth ✦Animations & scrolling feel jumpy ✦Small issues ✦Need to render a frame within 16 milliseconds for 60fps
  • 12. Logic Performance © Codename One 2017 all rights reserved ✦More common than rendering performance
  • 13. Logic Performance © Codename One 2017 all rights reserved ✦More common than rendering performance ✦CPU Starvation
  • 14. Logic Performance © Codename One 2017 all rights reserved ✦More common than rendering performance ✦CPU Starvation ✦Causes delay/bounce - not uniform impact
  • 15. Logic Performance © Codename One 2017 all rights reserved ✦More common than rendering performance ✦CPU Starvation ✦Causes delay/bounce - not uniform impact ✦Use caching/threading effectively to solve
  • 16. Memory Thrashing & Crashes © Codename One 2017 all rights reserved ✦GC Thrashing - rapid alloc/discard
  • 17. Memory Thrashing & Crashes © Codename One 2017 all rights reserved ✦GC Thrashing - rapid alloc/discard ✦Cache clearance
  • 18. Perceived Performance © Codename One 2017 all rights reserved ✦Experiment:
  • 19. Perceived Performance © Codename One 2017 all rights reserved ✦Experiment: ✓ Show a button after 1 second delay with no indication
  • 20. Perceived Performance © Codename One 2017 all rights reserved ✦Experiment: ✓ Show a button after 1 second delay with no indication ✓ Do the same with 2 seconds delay but write “Loading…” on the button after the tap
  • 21. Perceived Performance © Codename One 2017 all rights reserved ✦Experiment: ✓ Show a button after 1 second delay with no indication ✓ Do the same with 2 seconds delay but write “Loading…” on the button after the tap ✦The second version feels more responsive
  • 22. Perceived Performance © Codename One 2017 all rights reserved ✦Experiment: ✓ Show a button after 1 second delay with no indication ✓ Do the same with 2 seconds delay but write “Loading…” on the button after the tap ✦The second version feels more responsive ✦Try to avoid InfiniteProgress, try to show cached data and update in the background
  • 23. Perceived Performance © Codename One 2017 all rights reserved ✦Experiment: ✓ Show a button after 1 second delay with no indication ✓ Do the same with 2 seconds delay but write “Loading…” on the button after the tap ✦The second version feels more responsive ✦Try to avoid InfiniteProgress, try to show cached data and update in the background ✦This is probably the most common reason for end user performance complaints!
  • 24. Pareto Distribution: the 80-20 Rule © Codename One 2017 all rights reserved
  • 25. Pareto Distribution: the 80-20 Rule © Codename One 2017 all rights reserved The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming
  • 26. Pareto Distribution: the 80-20 Rule © Codename One 2017 all rights reserved The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming
  • 27. Pareto Distribution: the 80-20 Rule © Codename One 2017 all rights reserved The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming Donald Knuth
  • 28. Pareto Distribution: the 80-20 Rule © Codename One 2017 all rights reserved The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming Donald Knuth “
  • 29. Pareto Distribution: the 80-20 Rule © Codename One 2017 all rights reserved ✦When you spend time optimizing at an early stage you will have an unmaintainable app
  • 30. Pareto Distribution: the 80-20 Rule © Codename One 2017 all rights reserved ✦When you spend time optimizing at an early stage you will have an unmaintainable app ✦Caching is key
  • 31. Pareto Distribution: the 80-20 Rule © Codename One 2017 all rights reserved ✦When you spend time optimizing at an early stage you will have an unmaintainable app ✦Caching is key ✦In my experience performance is more of a 98% - 2% rule