SlideShare a Scribd company logo
1 of 9
Download to read offline
Lightning Components
Performance best practices
@FabienTaillon
Fabien Taillon, Salesforce MVP, CTO @TEXEÏ
Lightning Components
Performance best practices
@FabienTaillon
Fabien Taillon, Salesforce MVP, CTO @TEXEÏ
Activate Debug Mode for your user
Needed to clear unrendered body
Performance degradation] markup://aura:if ["3:313;a"] in c:myComponent ["1:313;a"] needed to clear
unrendered body.
More info: https://developer.salesforce.com/docs/atlas.en-
us.lightning.meta/lightning/perf_warnings_if.htm
Always set <aura:if isTrue="{!v.visible}"> to false by default, then switch it to true.
Multiple items set in the same Aura cycle
[Performance degradation] markup://aura:iteration [id:5:251;a] in c:myComponent ["1:251;a"] had
multiple items set in the same Aura cycle.
More info: https://developer.salesforce.com/docs/atlas.en-
us.lightning.meta/lightning/perf_warnings_iteration.htm
Don't set several time your list values
• As a default value and then later in JS
• Several time in JS
More generally on aura:iteration
on aura:iteration
Be careful: for every update to the list, all lines are rerendered (even if there is no change)
• No real workaround
• Have it in mind
• Avoid doing too many logic in the child
• Filter the list in the parent instead of using aura:if on the line
• For 5 records displayed on a list of 1000, aura:if will be created 1000 times
• Everytime you set your list (using component.set), your components init is called (not only once in an
aura:cycle)
action.setStorable();
Makes use of cached data
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_storable_actions.htm
https://developer.salesforce.com/blogs/developer-relations/2017/03/lightning-components-best-practices-caching-data-storable-
actions.html
Use storable actions when you can
https://github.com/FabienTaillon/AuraPerfs
GitHub repo
Paris,
15th November 2018
Lightning Components Best Practices by Fabien Taillon

More Related Content

What's hot

WordPress Plugins
WordPress PluginsWordPress Plugins
WordPress Pluginsrandyhoyt
 
Expose web service
Expose web serviceExpose web service
Expose web serviceSon Nguyen
 
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails AppAdding High Performance Search to your Grails App
Adding High Performance Search to your Grails AppAdam Creeger
 
The Anatomy of a Seriously Sophisticated AIR Application
The Anatomy of a Seriously Sophisticated AIR ApplicationThe Anatomy of a Seriously Sophisticated AIR Application
The Anatomy of a Seriously Sophisticated AIR ApplicationAdam Creeger
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOsama Mustafa
 
Force.com Migration Tool
Force.com Migration ToolForce.com Migration Tool
Force.com Migration ToolAtul Gupta(8X)
 
Enable Authentication and Authorization with Azure Active Directory and Sprin...
Enable Authentication and Authorization with Azure Active Directory and Sprin...Enable Authentication and Authorization with Azure Active Directory and Sprin...
Enable Authentication and Authorization with Azure Active Directory and Sprin...VMware Tanzu
 
How to Upgrade Your Database Plan on Heroku and Rails Setup?
How to Upgrade Your Database Plan on Heroku and Rails Setup?How to Upgrade Your Database Plan on Heroku and Rails Setup?
How to Upgrade Your Database Plan on Heroku and Rails Setup?Katy Slemon
 
My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1Alex Fernandez
 
Rails Plugins 1 Plugin
Rails Plugins 1 PluginRails Plugins 1 Plugin
Rails Plugins 1 Pluginoscon2007
 
Testing in Infrastructure
Testing in InfrastructureTesting in Infrastructure
Testing in InfrastructureMuhammet Arslan
 
Rapid Development with Azure Spring Cloud
Rapid Development with Azure Spring CloudRapid Development with Azure Spring Cloud
Rapid Development with Azure Spring CloudVMware Tanzu
 
Deploy with maven
Deploy with mavenDeploy with maven
Deploy with mavenSon Nguyen
 
ASP.NET Core 2.0 - Best Practices per le Web API
ASP.NET Core 2.0 - Best Practices per le Web APIASP.NET Core 2.0 - Best Practices per le Web API
ASP.NET Core 2.0 - Best Practices per le Web APIEmanuele Bartolesi
 
Quickly Build Spring Boot Applications to Consume Public Cloud Services
Quickly Build Spring Boot Applications to Consume Public Cloud ServicesQuickly Build Spring Boot Applications to Consume Public Cloud Services
Quickly Build Spring Boot Applications to Consume Public Cloud ServicesVMware Tanzu
 
Open mic ibm connections and ibm verse on premise integration 1
Open mic  ibm connections and ibm verse on premise integration 1Open mic  ibm connections and ibm verse on premise integration 1
Open mic ibm connections and ibm verse on premise integration 1sreeJk
 
Athena, Android UI Testing Platfrom
Athena, Android UI Testing PlatfromAthena, Android UI Testing Platfrom
Athena, Android UI Testing PlatfromBuddy Arifin
 

What's hot (20)

WordPress Plugins
WordPress PluginsWordPress Plugins
WordPress Plugins
 
Expose web service
Expose web serviceExpose web service
Expose web service
 
Adding High Performance Search to your Grails App
Adding High Performance Search to your Grails AppAdding High Performance Search to your Grails App
Adding High Performance Search to your Grails App
 
The Anatomy of a Seriously Sophisticated AIR Application
The Anatomy of a Seriously Sophisticated AIR ApplicationThe Anatomy of a Seriously Sophisticated AIR Application
The Anatomy of a Seriously Sophisticated AIR Application
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c Installation
 
Force.com Migration Tool
Force.com Migration ToolForce.com Migration Tool
Force.com Migration Tool
 
Enable Authentication and Authorization with Azure Active Directory and Sprin...
Enable Authentication and Authorization with Azure Active Directory and Sprin...Enable Authentication and Authorization with Azure Active Directory and Sprin...
Enable Authentication and Authorization with Azure Active Directory and Sprin...
 
How to Upgrade Your Database Plan on Heroku and Rails Setup?
How to Upgrade Your Database Plan on Heroku and Rails Setup?How to Upgrade Your Database Plan on Heroku and Rails Setup?
How to Upgrade Your Database Plan on Heroku and Rails Setup?
 
Helm your way with Kubernetes
Helm your way with KubernetesHelm your way with Kubernetes
Helm your way with Kubernetes
 
My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1My journey and learnings using mule esb part 1
My journey and learnings using mule esb part 1
 
Rails Plugins 1 Plugin
Rails Plugins 1 PluginRails Plugins 1 Plugin
Rails Plugins 1 Plugin
 
Testing in Infrastructure
Testing in InfrastructureTesting in Infrastructure
Testing in Infrastructure
 
Easy ota intro
Easy ota introEasy ota intro
Easy ota intro
 
Rapid Development with Azure Spring Cloud
Rapid Development with Azure Spring CloudRapid Development with Azure Spring Cloud
Rapid Development with Azure Spring Cloud
 
Deploy with maven
Deploy with mavenDeploy with maven
Deploy with maven
 
ASP.NET Core 2.0 - Best Practices per le Web API
ASP.NET Core 2.0 - Best Practices per le Web APIASP.NET Core 2.0 - Best Practices per le Web API
ASP.NET Core 2.0 - Best Practices per le Web API
 
Quickly Build Spring Boot Applications to Consume Public Cloud Services
Quickly Build Spring Boot Applications to Consume Public Cloud ServicesQuickly Build Spring Boot Applications to Consume Public Cloud Services
Quickly Build Spring Boot Applications to Consume Public Cloud Services
 
Initialize database in Mule part2
Initialize database in Mule part2Initialize database in Mule part2
Initialize database in Mule part2
 
Open mic ibm connections and ibm verse on premise integration 1
Open mic  ibm connections and ibm verse on premise integration 1Open mic  ibm connections and ibm verse on premise integration 1
Open mic ibm connections and ibm verse on premise integration 1
 
Athena, Android UI Testing Platfrom
Athena, Android UI Testing PlatfromAthena, Android UI Testing Platfrom
Athena, Android UI Testing Platfrom
 

Similar to Lightning Components Best Practices by Fabien Taillon

Lightning Testing Service
Lightning Testing ServiceLightning Testing Service
Lightning Testing ServiceRahul Malhotra
 
Debugging lightning components
Debugging lightning componentsDebugging lightning components
Debugging lightning componentsMadan Khichi
 
Debugging lightning components
Debugging lightning componentsDebugging lightning components
Debugging lightning componentsMohith Shrivastava
 
Flex component lifecycle
Flex component lifecycleFlex component lifecycle
Flex component lifecycleYaniv Uriel
 
MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 Joe Ferguson
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCPwhbath
 
Developing Drizzle Replication Plugins
Developing Drizzle Replication PluginsDeveloping Drizzle Replication Plugins
Developing Drizzle Replication PluginsPadraig O'Sullivan
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsJelastic Multi-Cloud PaaS
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migrationAmit Sharma
 
Getting started with rails active storage wae
Getting started with rails active storage waeGetting started with rails active storage wae
Getting started with rails active storage waeBishal Khanal
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migrationAmit Sharma
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utilityAmit Sharma
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudCarlos Sanchez
 
Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Salesforce Developers
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyTim Pettersen
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utilityAmit Sharma
 
Athena java dev guide
Athena java dev guideAthena java dev guide
Athena java dev guidedvdung
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialRaghavan Mohan
 
Recapture Disk Space in Agile PLM
Recapture Disk Space in Agile PLM Recapture Disk Space in Agile PLM
Recapture Disk Space in Agile PLM PLM Mechanic .
 

Similar to Lightning Components Best Practices by Fabien Taillon (20)

Lightning Testing Service
Lightning Testing ServiceLightning Testing Service
Lightning Testing Service
 
Using Maven2
Using Maven2Using Maven2
Using Maven2
 
Debugging lightning components
Debugging lightning componentsDebugging lightning components
Debugging lightning components
 
Debugging lightning components
Debugging lightning componentsDebugging lightning components
Debugging lightning components
 
Flex component lifecycle
Flex component lifecycleFlex component lifecycle
Flex component lifecycle
 
MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5
 
Introduction To Eclipse RCP
Introduction To Eclipse RCPIntroduction To Eclipse RCP
Introduction To Eclipse RCP
 
Developing Drizzle Replication Plugins
Developing Drizzle Replication PluginsDeveloping Drizzle Replication Plugins
Developing Drizzle Replication Plugins
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE Applications
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migration
 
Getting started with rails active storage wae
Getting started with rails active storage waeGetting started with rails active storage wae
Getting started with rails active storage wae
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migration
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utility
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
 
Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1Mastering the Lightning Framework - Part 1
Mastering the Lightning Framework - Part 1
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utility
 
Athena java dev guide
Athena java dev guideAthena java dev guide
Athena java dev guide
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
 
Recapture Disk Space in Agile PLM
Recapture Disk Space in Agile PLM Recapture Disk Space in Agile PLM
Recapture Disk Space in Agile PLM
 

More from Bordeaux Salesforce Developer Group

Winter '20 Salesforce Release for Admins and Developers + New Salesforce Mobi...
Winter '20 Salesforce Release for Admins and Developers + New Salesforce Mobi...Winter '20 Salesforce Release for Admins and Developers + New Salesforce Mobi...
Winter '20 Salesforce Release for Admins and Developers + New Salesforce Mobi...Bordeaux Salesforce Developer Group
 
Introduction to Mulesoft and Salesforce Spring '19 release features
Introduction to Mulesoft and Salesforce Spring '19 release featuresIntroduction to Mulesoft and Salesforce Spring '19 release features
Introduction to Mulesoft and Salesforce Spring '19 release featuresBordeaux Salesforce Developer Group
 

More from Bordeaux Salesforce Developer Group (13)

Salesforce Spring '21 - Release Overview
Salesforce Spring '21 - Release OverviewSalesforce Spring '21 - Release Overview
Salesforce Spring '21 - Release Overview
 
Summer '20 Release Overview
Summer '20 Release OverviewSummer '20 Release Overview
Summer '20 Release Overview
 
Why and how to build your career on Salesforce ?
Why and how to build your career on Salesforce ?Why and how to build your career on Salesforce ?
Why and how to build your career on Salesforce ?
 
Salesforce Spring'20 Features
Salesforce Spring'20 FeaturesSalesforce Spring'20 Features
Salesforce Spring'20 Features
 
Dreamforce Global Gathering
Dreamforce Global Gathering Dreamforce Global Gathering
Dreamforce Global Gathering
 
Winter '20 Salesforce Release for Admins and Developers + New Salesforce Mobi...
Winter '20 Salesforce Release for Admins and Developers + New Salesforce Mobi...Winter '20 Salesforce Release for Admins and Developers + New Salesforce Mobi...
Winter '20 Salesforce Release for Admins and Developers + New Salesforce Mobi...
 
Workshop - Lightning Web Components
Workshop - Lightning Web ComponentsWorkshop - Lightning Web Components
Workshop - Lightning Web Components
 
Workshop Lightning Web Components
Workshop Lightning Web ComponentsWorkshop Lightning Web Components
Workshop Lightning Web Components
 
Introduction to Mulesoft and Salesforce Spring '19 release features
Introduction to Mulesoft and Salesforce Spring '19 release featuresIntroduction to Mulesoft and Salesforce Spring '19 release features
Introduction to Mulesoft and Salesforce Spring '19 release features
 
Introduction to Lightning Web Components
Introduction to Lightning Web ComponentsIntroduction to Lightning Web Components
Introduction to Lightning Web Components
 
Bordeaux FR Developers Group - Dreamforce 18 Global Gathering
Bordeaux FR Developers Group  - Dreamforce 18 Global GatheringBordeaux FR Developers Group  - Dreamforce 18 Global Gathering
Bordeaux FR Developers Group - Dreamforce 18 Global Gathering
 
Dreamforce global gathering
Dreamforce global gatheringDreamforce global gathering
Dreamforce global gathering
 
Salesforce Winter'18 - Platform Events - Salesforce DX
Salesforce Winter'18 - Platform Events - Salesforce DXSalesforce Winter'18 - Platform Events - Salesforce DX
Salesforce Winter'18 - Platform Events - Salesforce DX
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

Lightning Components Best Practices by Fabien Taillon

  • 1. Lightning Components Performance best practices @FabienTaillon Fabien Taillon, Salesforce MVP, CTO @TEXEÏ Lightning Components Performance best practices @FabienTaillon Fabien Taillon, Salesforce MVP, CTO @TEXEÏ
  • 2. Activate Debug Mode for your user
  • 3. Needed to clear unrendered body Performance degradation] markup://aura:if ["3:313;a"] in c:myComponent ["1:313;a"] needed to clear unrendered body. More info: https://developer.salesforce.com/docs/atlas.en- us.lightning.meta/lightning/perf_warnings_if.htm Always set <aura:if isTrue="{!v.visible}"> to false by default, then switch it to true.
  • 4. Multiple items set in the same Aura cycle [Performance degradation] markup://aura:iteration [id:5:251;a] in c:myComponent ["1:251;a"] had multiple items set in the same Aura cycle. More info: https://developer.salesforce.com/docs/atlas.en- us.lightning.meta/lightning/perf_warnings_iteration.htm Don't set several time your list values • As a default value and then later in JS • Several time in JS
  • 5. More generally on aura:iteration on aura:iteration Be careful: for every update to the list, all lines are rerendered (even if there is no change) • No real workaround • Have it in mind • Avoid doing too many logic in the child • Filter the list in the parent instead of using aura:if on the line • For 5 records displayed on a list of 1000, aura:if will be created 1000 times • Everytime you set your list (using component.set), your components init is called (not only once in an aura:cycle)
  • 6. action.setStorable(); Makes use of cached data https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_storable_actions.htm https://developer.salesforce.com/blogs/developer-relations/2017/03/lightning-components-best-practices-caching-data-storable- actions.html Use storable actions when you can