Lightning Components
Improve Performance of Lightning Components

Improve Performance of Lightning Components


I would find the best practices of lightning components, which makes the performance improvement in salesforce.

There are several posts from many bloggers, and salesforce already explained reg. same

Lightning Components run at the client-side, on a single page (where they are created and destroyed as needed), and other components that work on the same data. Salesforce has done an amazing job with creating the Lightning Component framework.

List of Lightning Components performance best practices

  • Data retrieval
  • Data caching
  • Component instantiation
  • Conditional rendering
  • Data binding
  • Lists (aura:iteration)
  • Events
  • Third-party JavaScript libraries
  • Base Lightning Components
  • Image optimization
  • Rendering and reflow
  • Development settings vs. production settings
  • Performance profiling tools

Each of the above points clearly explained in below article

Also to conclude

  • Analyze the impact of external CSS and JS, Eg: don’t use jQuery for just manipulating DOM.
  • If needed, always use minified CSS and JS, and remove unused code.
  • Optimize images
  • Go to the server at the last resort.
  • Make use of app builder and design features, drive the behavior.
  • For read-only actions, make use of storable actions.
  • For a long-running process, make use of background actions.
  • Dynamically create components instead of using multiple <aura: if>
  • Don’t use <a> tags for internal navigation; use URL events; using <a> tag, the whole app is refreshed, the state is lost, and there is no benefit of having a single-page app.

The performance of an application is impacted by many different factors. The performance optimization techniques described in this article are general guidelines that should help you build faster and more responsive applications. Try them out in your application, and let us know what your favorite performance optimization techniques are.

Thanks for Reading..

Leave a Reply

Your email address will not be published. Required fields are marked *