Speed Of Lightning
Diego Ferrero Val
Steven Bougon
Ashray Mathur
​  Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
​  This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties
materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or
implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking,
including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements
regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded
services or technology developments and customer contracts or use of our services.
​  The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality
for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and
rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with
completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability
to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our
limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential
factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year
and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are
available on the SEC Filings section of the Investor Information section of our Web site.
​  Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and
may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are
currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Safe Harbor
Speakers
Diego Ferreiro Val
Architect
Salesforce
Ashray Mathur
Lead Engineer
Salesforce
Steven Bougon
Principal Engineer
Salesforce
Agenda
❖  A Lightning App
❖  Metrics Service
❖  Instrument and Fix
❖  Making Lightning Experience Faster
Building a Lightning App
Live Walkthrough
Speed of Lightning
Speed of Lightning
Speed of Lightning
API.cmp
Brewery.cmp
Beer.cmp
BeerTest.app
Click: Brewery API.cmp Beer.cmp
calls creates
calls creates
Click: Search API.cmp Brewery.cmp
Click: Load more API.cmp Brewery.cmp
createscalls
Let’s go to …
●  https://speed-of-lightning.herokuapp.com/
●  Developer Console
Metrics Service
A tool to measure and analyze performance
What is Metrics Service?
“Metrics Service is a new module of Lightning
Framework that allows you to measure your
performance for every component in a
modular, holistic and scalable way.”
Why?
$A.ns.AuraRenderingService.prototype.rerenderDirty	
  =	
  function(stackName)	
  {	
  	
  
var	
  initialMarkName	
  =	
  "Rerendering-­‐"	
  +	
  num;	
  	
  
$A.Perf.mark(initialMarkName);	
  
$A.Perf.mark("Fired	
  aura:doneRendering	
  event");	
  	
  
//	
  #if	
  {"modes"	
  :	
  ["PTEST","STATS"]}	
  var	
  	
  
allRerendered	
  =	
  {	
  "stackName"	
  :	
  stackName	
  };	
  	
  
$A.Perf.mark("Fired	
  aura:stackname",	
  allRendered);	
  	
  
//	
  #end	
  	
  
}	
  
Jiffy marks
$mark all the things!
handler_aura_locationChange	
  :	
  function(component,	
  event)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $A.mark("one:handler_aura_locationChange");	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  if	
  (<CONDITION>	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <PROCESSING>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $A.endMark("one:handler_aura_locationChange");	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  return;	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  if	
  (<CONDITION>	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <PROCESSING>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $A.endMark("one:handler_aura_locationChange");	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  return;	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <PROCESSING>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $A.endMark("one:handler_aura_locationChange");	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
Jiffy marks
$mark all the things!
Metrics Service example
How to instrument your code in Lightning
API.cmp
var	
  original	
  =	
  $A.createComponent;	
  	
  
$A.createComponent	
  =	
  function	
  ()	
  {	
  	
  
	
  	
  	
  	
  //	
  Do	
  something	
  before,	
  in	
  the	
  context	
  of	
  the	
  original	
  	
  
	
  	
  	
  	
  before.apply(this,	
  arguments);	
  	
  
	
  	
  	
  	
  //	
  Invoke	
  original	
  	
  
	
  	
  	
  	
  var	
  ret	
  =	
  original.apply(this,	
  arguments);	
  	
  
	
  	
  	
  	
  //	
  Do	
  something	
  after	
  ,	
  in	
  the	
  context	
  of	
  the	
  original	
  	
  
	
  	
  	
  	
  after.apply(this,	
  arguments);	
  	
  
	
  	
  	
  	
  //	
  Return	
  original	
  	
  
	
  	
  	
  	
  return	
  ret;	
  	
  
};	
  
	
  
Aspect Oriented programming
Relying on services and public APIS
Metrics Service - Brewery
Server
BeerApp
API
loadBreweries()
requestAPI()
DBCALLS()
createComponent
callback()
beerApp.set(“v.breweries”, breweries)
createComponent
MetricsService - Brewery
Server
BeerApp
API
loadBreweries()
requestAPI()
DBCALLS()
createComponent
callback()
beerApp.set(“v.breweries”, breweries)
createComponent
Transaction
MetricsService - Example
Example of how metricsService work using S1 (like: ObjectHome)
$A.metricsService.transactionStart("S1App", "myStuff", {context:{}})
$A.metricsService.transactionEnd("S1App", "myStuff");
$A.metricsService.markStart("S1App", "foo", {context:{}})
$A.metricsService.markEnd("S1App", "foo", {context:{}})
Let’s instrument our Beer App!
Metrics Service Logs
Deciphering the data
#tricks
$A.metricsService.onTransactionEnd(function (t) {
console.log(t);
});
Logging transactions:
Let’s fix our Beer app!
Making Lightning Experience
Faster
Lightning Experience is Faster
​ Lightning Fast!
Upto ~85%
Improvement in
Page Load Times
Salesforce Classic vs Lightning Experience
​ Performance Comparison
Upto ~27%
Faster than
Salesforce Classic
Lightning
+
Metrics Service
Resources
Metrics Service Doc
Github code for this app
Heroku getting started
http://www.brewerydb.com/developers

More Related Content

PDF
PrésiTrack : l'analyse de la semaine du 13 au 17 mars
PDF
Advanced Lightning Components
PDF
Enterprise API New Features and Roadmap
PPTX
Build custom user interfaces for your Salesforce data with the UI API
PDF
New Lightning Experience: Build Custom Apps in a Flash
PPTX
Lightning Component Framework from 0 to App
PPTX
Pittsburgh, PA Salesforce Trailblazer Community Group Global Gathering DF2019
PDF
Lightning Components: The Future
PrésiTrack : l'analyse de la semaine du 13 au 17 mars
Advanced Lightning Components
Enterprise API New Features and Roadmap
Build custom user interfaces for your Salesforce data with the UI API
New Lightning Experience: Build Custom Apps in a Flash
Lightning Component Framework from 0 to App
Pittsburgh, PA Salesforce Trailblazer Community Group Global Gathering DF2019
Lightning Components: The Future

Similar to Speed of Lightning (20)

PPTX
Building apps faster with lightning and winter '17
PPTX
Building Apps Faster with Lightning and Winter '17
PDF
Build a Lightning Reporting App with the Salesforce Analytics API
PDF
All Aboard the Lightning Components Action Service
PPTX
Modern UI development with Lightning Components - Spanish!
PPTX
SD DUG Salesforce Lightning Week
PDF
Architect day 20181128- Morning Sessions
PDF
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
PDF
Scaling to Millions of Devices and Billions of Events
PPTX
Building Command-line Tools with the Tooling API
PPTX
Developers Introduction To Lightning
PPTX
Igor Androsov on Mobilizing Salesforce Data with 12 Factor App on Heroku
PPTX
How to Get Started with Lightning - Umair Ilyas - December 2016
PPTX
How to Get Started with Salesforce Lightning
PPTX
Reading, UK Community Group - Dreamforce 2018 presentation
PPTX
Dreamforce Developer Recap
PDF
Salesforce: Go Faster with Lightning (DocuSign DevCon)
PDF
Control your world using the Salesforce1 Platform (IoT)
PPTX
TrailheaDX India : Developer Highlights
PPTX
Summer 23 LWC Updates + Slack Apps.pptx
Building apps faster with lightning and winter '17
Building Apps Faster with Lightning and Winter '17
Build a Lightning Reporting App with the Salesforce Analytics API
All Aboard the Lightning Components Action Service
Modern UI development with Lightning Components - Spanish!
SD DUG Salesforce Lightning Week
Architect day 20181128- Morning Sessions
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Scaling to Millions of Devices and Billions of Events
Building Command-line Tools with the Tooling API
Developers Introduction To Lightning
Igor Androsov on Mobilizing Salesforce Data with 12 Factor App on Heroku
How to Get Started with Lightning - Umair Ilyas - December 2016
How to Get Started with Salesforce Lightning
Reading, UK Community Group - Dreamforce 2018 presentation
Dreamforce Developer Recap
Salesforce: Go Faster with Lightning (DocuSign DevCon)
Control your world using the Salesforce1 Platform (IoT)
TrailheaDX India : Developer Highlights
Summer 23 LWC Updates + Slack Apps.pptx
Ad

More from Salesforce Developers (20)

PDF
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
PDF
Maximizing Salesforce Lightning Experience and Lightning Component Performance
PDF
Local development with Open Source Base Components
PDF
Why developers shouldn’t miss TrailheaDX India
PPTX
CodeLive: Build Lightning Web Components faster with Local Development
PPTX
CodeLive: Converting Aura Components to Lightning Web Components
PPTX
Enterprise-grade UI with open source Lightning Web Components
PPTX
TrailheaDX and Summer '19: Developer Highlights
PDF
Live coding with LWC
PDF
Lightning web components - Episode 4 : Security and Testing
PDF
LWC Episode 3- Component Communication and Aura Interoperability
PDF
Lightning web components episode 2- work with salesforce data
PDF
Lightning web components - Episode 1 - An Introduction
PDF
Migrating CPQ to Advanced Calculator and JSQCP
PDF
Scale with Large Data Volumes and Big Objects in Salesforce
PDF
Replicate Salesforce Data in Real Time with Change Data Capture
PDF
Modern Development with Salesforce DX
PDF
Get Into Lightning Flow Development
PDF
Integrate CMS Content Into Lightning Communities with CMS Connect
PDF
Introduction to MuleSoft
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Local development with Open Source Base Components
Why developers shouldn’t miss TrailheaDX India
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Converting Aura Components to Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
TrailheaDX and Summer '19: Developer Highlights
Live coding with LWC
Lightning web components - Episode 4 : Security and Testing
LWC Episode 3- Component Communication and Aura Interoperability
Lightning web components episode 2- work with salesforce data
Lightning web components - Episode 1 - An Introduction
Migrating CPQ to Advanced Calculator and JSQCP
Scale with Large Data Volumes and Big Objects in Salesforce
Replicate Salesforce Data in Real Time with Change Data Capture
Modern Development with Salesforce DX
Get Into Lightning Flow Development
Integrate CMS Content Into Lightning Communities with CMS Connect
Introduction to MuleSoft
Ad

Recently uploaded (20)

PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
August Patch Tuesday
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
DOCX
search engine optimization ppt fir known well about this
PPTX
The various Industrial Revolutions .pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Unlock new opportunities with location data.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Zenith AI: Advanced Artificial Intelligence
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Assigned Numbers - 2025 - Bluetooth® Document
Final SEM Unit 1 for mit wpu at pune .pptx
sustainability-14-14877-v2.pddhzftheheeeee
August Patch Tuesday
O2C Customer Invoices to Receipt V15A.pptx
CloudStack 4.21: First Look Webinar slides
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Web Crawler for Trend Tracking Gen Z Insights.pptx
1 - Historical Antecedents, Social Consideration.pdf
search engine optimization ppt fir known well about this
The various Industrial Revolutions .pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
NewMind AI Weekly Chronicles – August ’25 Week III
Taming the Chaos: How to Turn Unstructured Data into Decisions
A comparative study of natural language inference in Swahili using monolingua...
Hindi spoken digit analysis for native and non-native speakers
Unlock new opportunities with location data.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Zenith AI: Advanced Artificial Intelligence

Speed of Lightning

  • 1. Speed Of Lightning Diego Ferrero Val Steven Bougon Ashray Mathur
  • 2. ​  Safe harbor statement under the Private Securities Litigation Reform Act of 1995: ​  This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. ​  The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. ​  Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements. Safe Harbor
  • 3. Speakers Diego Ferreiro Val Architect Salesforce Ashray Mathur Lead Engineer Salesforce Steven Bougon Principal Engineer Salesforce
  • 4. Agenda ❖  A Lightning App ❖  Metrics Service ❖  Instrument and Fix ❖  Making Lightning Experience Faster
  • 5. Building a Lightning App Live Walkthrough
  • 10. Click: Brewery API.cmp Beer.cmp calls creates calls creates Click: Search API.cmp Brewery.cmp Click: Load more API.cmp Brewery.cmp createscalls
  • 11. Let’s go to … ●  https://speed-of-lightning.herokuapp.com/ ●  Developer Console
  • 12. Metrics Service A tool to measure and analyze performance
  • 13. What is Metrics Service?
  • 14. “Metrics Service is a new module of Lightning Framework that allows you to measure your performance for every component in a modular, holistic and scalable way.”
  • 15. Why?
  • 16. $A.ns.AuraRenderingService.prototype.rerenderDirty  =  function(stackName)  {     var  initialMarkName  =  "Rerendering-­‐"  +  num;     $A.Perf.mark(initialMarkName);   $A.Perf.mark("Fired  aura:doneRendering  event");     //  #if  {"modes"  :  ["PTEST","STATS"]}  var     allRerendered  =  {  "stackName"  :  stackName  };     $A.Perf.mark("Fired  aura:stackname",  allRendered);     //  #end     }   Jiffy marks $mark all the things!
  • 17. handler_aura_locationChange  :  function(component,  event)  {                          $A.mark("one:handler_aura_locationChange");                          if  (<CONDITION>  {                                  <PROCESSING>                                  $A.endMark("one:handler_aura_locationChange");                                  return;                          }                        if  (<CONDITION>  {                                  <PROCESSING>                                  $A.endMark("one:handler_aura_locationChange");                                  return;                          }                          <PROCESSING>                          $A.endMark("one:handler_aura_locationChange");                  }   Jiffy marks $mark all the things!
  • 18. Metrics Service example How to instrument your code in Lightning
  • 20. var  original  =  $A.createComponent;     $A.createComponent  =  function  ()  {            //  Do  something  before,  in  the  context  of  the  original            before.apply(this,  arguments);            //  Invoke  original            var  ret  =  original.apply(this,  arguments);            //  Do  something  after  ,  in  the  context  of  the  original            after.apply(this,  arguments);            //  Return  original            return  ret;     };     Aspect Oriented programming Relying on services and public APIS
  • 21. Metrics Service - Brewery Server BeerApp API loadBreweries() requestAPI() DBCALLS() createComponent callback() beerApp.set(“v.breweries”, breweries) createComponent
  • 23. MetricsService - Example Example of how metricsService work using S1 (like: ObjectHome) $A.metricsService.transactionStart("S1App", "myStuff", {context:{}}) $A.metricsService.transactionEnd("S1App", "myStuff"); $A.metricsService.markStart("S1App", "foo", {context:{}}) $A.metricsService.markEnd("S1App", "foo", {context:{}})
  • 27. Let’s fix our Beer app!
  • 29. Lightning Experience is Faster ​ Lightning Fast! Upto ~85% Improvement in Page Load Times
  • 30. Salesforce Classic vs Lightning Experience ​ Performance Comparison Upto ~27% Faster than Salesforce Classic
  • 32. Resources Metrics Service Doc Github code for this app Heroku getting started http://www.brewerydb.com/developers