SlideShare a Scribd company logo
1 of 13
9 Ways To Improve
ANGULARJS
PRESENTED BY
BHUVANESHWARI.S
What is Angularjs:
• Angularjs is the most widely used web app framework nowadays.
• And its popularity graph is constantly rising after the arrival of its much-
awaited version Angularjs 4.0.
• But we can see that almost every Angular expert still struggles with
various issues that directly correlate to Angularjs performance, even
though it has a lot of its own optimizations.
• Where the incorrect use of Angularjs methods restricts your application
stand in the market.
• So, Angularjs performance optimization becomes an important need of
every Angularjs development expert
9 ways to Improve Angularjs Performance:
 Batarang tool to benchmark watchers
 Use of native JavaScript or Lodash
 Chrome Dev-tool profiler to identify performance bottlenecks
 Minimize Watchers
 ng-if is better than ng-show
 Not to use ng-repeat
 Use $watch Collection(includes 3rd parameter)
 Use console.time for debugging issues
 Debounce ng-model
Batarang tool to benchmark watchers:
• Batarang is a great Dev-tool from the Angular team which lowers your
debugging efforts.
• Although it has many new features, some of them help you profile and
track the performance of your Angularjs performance.
• Moreover, Watch tree determines which scopes are not destroyed as it
seems to be if there is any increase in the memory.
Use of native JavaScript or Lodash:
• Lodash boosts your application performance by simply re-writing some
of the basic logic instead of relying on inbuilt Angularjs methods.
• If Lodash is not included in your application then you would probably
need to re-write everything in native JavaScript.
Chrome Dev-tool profiler to identify performance
bottlenecks:
• This one is a handy tool which gives you the option to select which profile
type you want to create.
• Record Allocation Timeline, Take Heap Snapshot, Record Allocation
Profile are used for memory profiling.
• After this performance optimization, you app will fully render in less than
2 seconds and users can freely interact then.
Minimize Watchers:
• Angularjs completely revolves around its digest cycle.
• Whenever a digest cycle is triggered, it loops over every binding to detect
model changes.
• The amount of time taken in each digest cycle can be reduced by reducing
the number of watchers.
• It also reduces application’s memory footprints.
ng-if is better than ng-show:
• ng-show directive toggle the CSS display property on a particular element
while ng-if directive actually removes the element from DOM and re-
create it if needed.
• Further, ng-switch directive is an alternative to ng-if for same performance
benefits.
Not to use ng-repeat:
• This is the biggest win for any app if it is not using ng-repeat directive.
• So it is advisable to avoid ng-repeat and build the HTML using JavaScript.
• For vocalize application, the use of ng-repeat results in addition of
unnecessary watchers.
• Use of ng-bind-html directive is a better solution to get rid of this problem.
Use $watchCollection(includes 3rd parameter):
• Using $watch with two parameters is good but using $watch with three
parameters.
• E.g. $watch(‘value’, function(){},true) makes Angular to perform deep
checking(to check every property of the object).
• But this could be expensive.
• Hence, to resolve such performance issue, angular
provides $watchCollection(‘value’, function(){}) which acts almost alike $watch
with 3rd parameter except it only checks first layer of object’s properties at low
cost.
Use console.time for debugging issues:
• If your application is struggling with debugging issues and effecting
Angular performance, then use console.time which is a great API.
Debounce ng-model
• You can debounce the input with ng-model. For example, to de-bounce the
search input like GOOGLE, you have to use ng-model
options=”{debounce:250}”.
• This makes the digest cycle get triggered no more than once per 250ms due to
the changes in this input model.
• Development time is at a premium nowadays, so you need a comprehensive
framework such as Angularjs to run your business quickly out of the box.
• After researching a lot, we have collected some other important tools to
enhance Angularjs performance.
Angularjs@ZerobugAcademy
• ZerobugAcademy provides Angularjs training in Chennai to professionals and
corporates on Angularjs version 2.0, HTML, CSS and JavaScript, Angular JS,
TypeScript and ES6, Components, Form Handling, Data Binding and much
more. Zerobug Academy provides more practical class which help you clear
the interviews and certification easily. After completion of course Zerobug
Academy will arrange you interviews in leading software companies in
Chennai, so it right time to join Angularjs training in Chennai at Zerobug
Academy.
Visit Us: www.zerobugacademy.com
Call Us: 9750061584

More Related Content

What's hot

What's hot (20)

Angular resolver tutorial
Angular resolver tutorialAngular resolver tutorial
Angular resolver tutorial
 
Why choose Angular 6?
Why choose Angular 6?Why choose Angular 6?
Why choose Angular 6?
 
Angular 5
Angular 5Angular 5
Angular 5
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
 
Angular EE - Special Workshop by Nir Kaufman
Angular EE - Special Workshop by Nir KaufmanAngular EE - Special Workshop by Nir Kaufman
Angular EE - Special Workshop by Nir Kaufman
 
Angular js training in noida
Angular js training in noidaAngular js training in noida
Angular js training in noida
 
What's new in WorkManager-Andri Suranta Ginting (Product Engineer-Gojek)
What's new in WorkManager-Andri Suranta Ginting (Product Engineer-Gojek)What's new in WorkManager-Andri Suranta Ginting (Product Engineer-Gojek)
What's new in WorkManager-Andri Suranta Ginting (Product Engineer-Gojek)
 
What angular 13 will bring to the table
What angular 13 will bring to the table What angular 13 will bring to the table
What angular 13 will bring to the table
 
angular-formly presentation
angular-formly presentationangular-formly presentation
angular-formly presentation
 
Quick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developersQuick introduction to Angular 4 for AngularJS 1.5 developers
Quick introduction to Angular 4 for AngularJS 1.5 developers
 
Angular 4 Introduction Tutorial
Angular 4 Introduction TutorialAngular 4 Introduction Tutorial
Angular 4 Introduction Tutorial
 
AngularJS
AngularJSAngularJS
AngularJS
 
Adventures with Angular 2
Adventures with Angular 2Adventures with Angular 2
Adventures with Angular 2
 
An Intro to Angular 2
An Intro to Angular 2An Intro to Angular 2
An Intro to Angular 2
 
Let's Build an Angular App!
Let's Build an Angular App!Let's Build an Angular App!
Let's Build an Angular App!
 
Angular 9 New features
Angular 9 New featuresAngular 9 New features
Angular 9 New features
 
Meetup SkillValue - Angular 6 : Bien démarrer son application
Meetup SkillValue - Angular 6 : Bien démarrer son applicationMeetup SkillValue - Angular 6 : Bien démarrer son application
Meetup SkillValue - Angular 6 : Bien démarrer son application
 
Angular 6 - The Complete Guide
Angular 6 - The Complete GuideAngular 6 - The Complete Guide
Angular 6 - The Complete Guide
 
RESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoTRESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoT
 
Angular2 intro
Angular2 introAngular2 intro
Angular2 intro
 

Similar to Bhuvi ppt zerobug

Similar to Bhuvi ppt zerobug (20)

Tips on How to Optimize AngularJS App Performance
Tips on How to Optimize AngularJS App PerformanceTips on How to Optimize AngularJS App Performance
Tips on How to Optimize AngularJS App Performance
 
Angularjs on line training
Angularjs on line trainingAngularjs on line training
Angularjs on line training
 
Angular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaAngular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad india
 
AngularJS
AngularJSAngularJS
AngularJS
 
AngularJS
AngularJS AngularJS
AngularJS
 
Angularjs
AngularjsAngularjs
Angularjs
 
What’s New in Angular 15.pptx
What’s New in Angular 15.pptxWhat’s New in Angular 15.pptx
What’s New in Angular 15.pptx
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
Top 10 Angular Development Tools For Developers
Top 10 Angular Development Tools For DevelopersTop 10 Angular Development Tools For Developers
Top 10 Angular Development Tools For Developers
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
 
Integrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMSIntegrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMS
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angular
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
THE FUTURE OF ANGULAR JS
THE FUTURE OF ANGULAR JSTHE FUTURE OF ANGULAR JS
THE FUTURE OF ANGULAR JS
 
Siebel best practices
Siebel best practicesSiebel best practices
Siebel best practices
 
Advantages of AngularJS
Advantages of AngularJSAdvantages of AngularJS
Advantages of AngularJS
 
AngularJS
AngularJSAngularJS
AngularJS
 
What is Angular Ivy?
What is Angular Ivy?What is Angular Ivy?
What is Angular Ivy?
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Top 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular AppTop 7 Angular Best Practices to Organize Your Angular App
Top 7 Angular Best Practices to Organize Your Angular App
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Bhuvi ppt zerobug

  • 1. 9 Ways To Improve ANGULARJS PRESENTED BY BHUVANESHWARI.S
  • 2. What is Angularjs: • Angularjs is the most widely used web app framework nowadays. • And its popularity graph is constantly rising after the arrival of its much- awaited version Angularjs 4.0. • But we can see that almost every Angular expert still struggles with various issues that directly correlate to Angularjs performance, even though it has a lot of its own optimizations. • Where the incorrect use of Angularjs methods restricts your application stand in the market. • So, Angularjs performance optimization becomes an important need of every Angularjs development expert
  • 3. 9 ways to Improve Angularjs Performance:  Batarang tool to benchmark watchers  Use of native JavaScript or Lodash  Chrome Dev-tool profiler to identify performance bottlenecks  Minimize Watchers  ng-if is better than ng-show  Not to use ng-repeat  Use $watch Collection(includes 3rd parameter)  Use console.time for debugging issues  Debounce ng-model
  • 4. Batarang tool to benchmark watchers: • Batarang is a great Dev-tool from the Angular team which lowers your debugging efforts. • Although it has many new features, some of them help you profile and track the performance of your Angularjs performance. • Moreover, Watch tree determines which scopes are not destroyed as it seems to be if there is any increase in the memory.
  • 5. Use of native JavaScript or Lodash: • Lodash boosts your application performance by simply re-writing some of the basic logic instead of relying on inbuilt Angularjs methods. • If Lodash is not included in your application then you would probably need to re-write everything in native JavaScript.
  • 6. Chrome Dev-tool profiler to identify performance bottlenecks: • This one is a handy tool which gives you the option to select which profile type you want to create. • Record Allocation Timeline, Take Heap Snapshot, Record Allocation Profile are used for memory profiling. • After this performance optimization, you app will fully render in less than 2 seconds and users can freely interact then.
  • 7. Minimize Watchers: • Angularjs completely revolves around its digest cycle. • Whenever a digest cycle is triggered, it loops over every binding to detect model changes. • The amount of time taken in each digest cycle can be reduced by reducing the number of watchers. • It also reduces application’s memory footprints.
  • 8. ng-if is better than ng-show: • ng-show directive toggle the CSS display property on a particular element while ng-if directive actually removes the element from DOM and re- create it if needed. • Further, ng-switch directive is an alternative to ng-if for same performance benefits.
  • 9. Not to use ng-repeat: • This is the biggest win for any app if it is not using ng-repeat directive. • So it is advisable to avoid ng-repeat and build the HTML using JavaScript. • For vocalize application, the use of ng-repeat results in addition of unnecessary watchers. • Use of ng-bind-html directive is a better solution to get rid of this problem.
  • 10. Use $watchCollection(includes 3rd parameter): • Using $watch with two parameters is good but using $watch with three parameters. • E.g. $watch(‘value’, function(){},true) makes Angular to perform deep checking(to check every property of the object). • But this could be expensive. • Hence, to resolve such performance issue, angular provides $watchCollection(‘value’, function(){}) which acts almost alike $watch with 3rd parameter except it only checks first layer of object’s properties at low cost.
  • 11. Use console.time for debugging issues: • If your application is struggling with debugging issues and effecting Angular performance, then use console.time which is a great API.
  • 12. Debounce ng-model • You can debounce the input with ng-model. For example, to de-bounce the search input like GOOGLE, you have to use ng-model options=”{debounce:250}”. • This makes the digest cycle get triggered no more than once per 250ms due to the changes in this input model. • Development time is at a premium nowadays, so you need a comprehensive framework such as Angularjs to run your business quickly out of the box. • After researching a lot, we have collected some other important tools to enhance Angularjs performance.
  • 13. Angularjs@ZerobugAcademy • ZerobugAcademy provides Angularjs training in Chennai to professionals and corporates on Angularjs version 2.0, HTML, CSS and JavaScript, Angular JS, TypeScript and ES6, Components, Form Handling, Data Binding and much more. Zerobug Academy provides more practical class which help you clear the interviews and certification easily. After completion of course Zerobug Academy will arrange you interviews in leading software companies in Chennai, so it right time to join Angularjs training in Chennai at Zerobug Academy. Visit Us: www.zerobugacademy.com Call Us: 9750061584