End-to-end software consulting services for web, mobile, and cloud-based solutions
Architect and optimize cloud-native solutions that enhance agility, resilience, and cost efficiency.
Modernize legacy systems into secure, scalable, and future-ready digital platforms.
Strengthen your technology landscape by embedding security and compliance into every layer.
Unlock business value by defining and implementing a clear, results-driven AI roadmap.
Design intuitive, user-centric interfaces that elevate engagement and drive measurable outcomes.
Validate product ideas and define a focused MVP roadmap that accelerates time to market.
Craft seamless end-to-end product experiences that align user needs with business goals.
Build scalable, high-performance web applications tailored to your unique business workflows.
Develop intuitive, feature-rich mobile apps that deliver seamless experiences across devices.
Engineer robust, extensible platforms that support growth, integrations, and evolving business needs.
Connect systems and streamline operations by designing secure, reliable APIs and integrations.
Enable agility and resilience by migrating, managing, and optimizing your cloud infrastructure.
Create resilient, scalable cloud-native applications built for performance and rapid innovation.
Accelerate releases and improve reliability by implementing automated, scalable DevOps practices.
Transform ideas into scalable, intelligent AI solutions.
Develop generative AI and LLM-powered applications that automate workflows and enhance human productivity.
Create intelligent conversational systems that deliver natural, context-aware customer interactions.
Deploy autonomous AI agents that reason, plan, and execute complex tasks across systems.
Implement computer vision systems that extract real-time insights from images and video streams.
Design and operationalize scalable data pipelines and ML systems that power intelligent decision-making.
Execute comprehensive manual and automated testing to accelerate releases without compromising reliability.
Optimize system performance by identifying bottlenecks and validating stability under peak loads.
Identify vulnerabilities and strengthen defenses through rigorous security testing and risk assessment.
Validate APIs for reliability, performance, and security to ensure seamless communication between systems and applications.
Ensure stability and continuous improvement through proactive monitoring, maintenance, and ongoing application support.
Transform legacy applications into scalable, cloud-ready systems built for performance and agility.
Migrate applications and infrastructure to the cloud with minimal disruption and optimized performance.
Drive measurable growth by running data-driven campaigns optimized for conversions, CAC, and ROI.
Improve organic visibility and rankings by optimizing your content, technical SEO, and search authority.
Improve app visibility and downloads by optimizing listings, keywords, and conversion elements across app stores.
Enhance your datasets with accurate, actionable insights that improve targeting, personalization, and decision-making.
Extend your team with skilled dedicated developers who align with your goals, workflows, and delivery timelines.
Set up a scalable offshore development center to accelerate product delivery while optimizing costs and operational efficiency.
Build secure, compliant healthcare solutions that improve patient outcomes and streamline operations.
Tailored healthcare apps built around your workflows, patients, and care delivery goals.
Secure virtual care platforms that connect patients and providers anytime, anywhere.
Intelligent EMR/EHR systems that streamline clinical workflows and improve care coordination.
Digital experiences that keep patients informed, connected, and actively engaged in their care journey.
Remote patient monitoring solutions that enable proactive care beyond hospital walls.
Smart home healthcare platforms that simplify caregiving, scheduling, and patient management.
AI-powered healthcare solutions that automate operations, enhance diagnostics, and improve patient outcomes.
Scalable SaaS products engineered for rapid growth, seamless user experiences, and recurring revenue.
Modernize legacy systems with cloud-native architectures, better performance, and future-ready technology.
Build a high-performing offshore development team that works as a seamless extension of your business.
Access skilled developers on demand to accelerate product delivery and scale engineering capacity.
Get strategic technology leadership and product direction without the cost of a full-time CTO.
Intelligent POS solutions that streamline billing, inventory, and customer experiences across retail operations.
Tailor-made accounting software designed to simplify financial operations and improve business visibility.
High-performance trading platforms built for secure, real-time, and seamless stock market transactions.
Robust digital platforms for secure gold trading, portfolio management, and real-time market insights.
Innovative insurance technology solutions that automate processes and enhance customer experiences.
Feature-rich eCommerce apps designed to deliver seamless shopping experiences across devices.
Direct-to-consumer commerce platforms that help brands drive engagement, loyalty, and sales growth.
Scalable multi-vendor marketplace platforms built for smooth transactions and business expansion.
End-to-end retail software solutions that optimize operations, inventory, and customer experiences.
Custom travel applications that simplify bookings, itineraries, and customer experiences.
Smart fleet and asset management systems that improve tracking, utilization, and operational efficiency
Digital ticketing and fare management solutions built for seamless payments and transit operations.
Build feature-rich OTT platforms that deliver seamless video streaming experiences across web, mobile, and smart devices.
Develop scalable live streaming applications with real-time broadcasting, low latency, and interactive user experiences.
Create flexible, user-friendly CMS solutions that simplify content management and support seamless digital experiences.
Develop secure, scalable core banking software that streamlines financial operations and enhances customer experiences.
Build cloud-based banking solutions that improve agility, scalability, and operational efficiency for modern financial institutions.
Create intelligent loan management software to automate lending workflows, improve compliance, and accelerate loan processing.
Build intelligent inventory management systems that optimize stock control, streamline operations, and reduce inefficiencies.
Develop reliable POS systems that simplify transactions, improve customer experiences, and support business growth.
Create comprehensive restaurant management software to streamline orders, inventory, billing, and daily operations.
Design custom CRM software tailored to your workflows to improve customer engagement, sales tracking, and business efficiency.
Discover who we are, what we build, and the values that drive our innovation journey.
Collaborate with us to create scalable technology solutions and shared business success.
Build your future with a team passionate about technology, innovation, and growth.
Meet the leaders shaping our vision, culture, and technology-driven growth
Explore conversations on technology, innovation, business trends, and digital transformation.
Insights, trends, and expert perspectives from the world of technology and software engineering.
Driving meaningful social impact through responsible initiatives and community-focused programs.
AngularJS can have performance problems when you start to scale your application. You may notice that your AngularJS application works well at first but as it grows in complexity, so does its load time. The problem amplifies when the application is opened on mobile device as that tends to be more slower because of obvious performance difference between desktop browser and mobile browser.
But there are ways to avoid such scenarios and enhance the performance of an Angular app.
Here are some ways:
Batarang
Batarang is an excellent Chrome extension for developing and debugging AngularJS apps. It also offers performance analysis and a dependency graph. If coming into an untested codebase, this would be a useful tool to determine which services should get the most attention.
Reduce Watchers
Reduce the number of watchers in your application. A big cause of slowness in AngularJS applications is because of large numbers of watchers. AngularJS uses dirty checking to check the state of the application by evaluating every watcher and applying changes in what is called the digest cycle. The more watchers you add, the longer you make your digest cycle. If a cycle is over 16ms, your UI will likely be very sluggish. 16ms is the max length if you want to maintain 60fps in your application.
So when are watchers set? The main examples are:
[php]{{ }} bindings In some directives (ng-show/ng-hide) Scope variables Filters (when piped) ng-repeat $scope.$watch[/php]
These watchers will be evaluated on every digest cycle, started by any of the following:
[php]ng-change ng-model changes $http events promises being resolved $timeout or $interval Manual calls to $scope.apply and $scope.digest One-time binding[/php]
One-time Binding
Angular processes the DOM as usual and once the value has been resolved it removes the particular property from it’s internal $watchers list.
Using the single binding syntax is easy and most importantly fast. The syntax is clear and concise, and a real benefit to lowering the $watcher overhead. The less work Angular has to do, the more responsive our applications will become.
For example,
[php]<div ng-class=”::{‘no-text-transform’ : ‘post.user.is_admin’’}”></div>[/php]
Avoid ng-repeat Where Possible
Ng-repeat is an incredibly powerful part of AngularJS and often easy to abuse and misuse. Having nested ng-repeats is a quick and easy way to increase your watcher count exponentially and should be avoided if at all possible.
You should also avoid functions in your html that attempt to determine the array to use in the ng-repeat. These functions need to recalculated even when there is no change, unnecessarily reloading the ng-repeat each time. Instead, try limiting the array to a fixed number and then track the ng-repeat by the index (better still, give each item a unique id). Doing this eliminates the need to create nodes in the DOM each time, it just changes values if needed. Pagination is a good way of limiting the amount of content you need to display and therefore need to watch.
Instead we could use quick-ng-repeat. It provides Shallow list watch (ngRepeat uses deep watch), Animations support, Special service to cause list render outside of digest cycle, Smooth scrolling even on heavy compiled lists, About 200% performance boost
[php]// don’t do this <div ng-repeat=”post in posts.list”> </div>[/php]
<div class=”white-blocks post-sec-outer” ng-repeat=”post in posts.list”></div>
[php]// use track by! <div ng-repeat=”post in posts.list track by $index”> </div>[/php]
[php]<div class=”white-blocks post-sec-outer” ng-repeat=”post in posts.list track by $index”></div>[/php]
What does track by actually do?
When posts.list is re-rendered, Angular does not have to rebuild an element which has already been rendered. This speeds up the cycle and avoids useless DOM manipulation.
Avoid repeated filters and Limit DOM filters
Filters are really simple to use, we insert a pipe, the filter name and we’re done. However, Angular runs every single filter twice per $digest cycle once something has changed. This is some pretty heavy lifting. The first run is from the $watchers detecting any changes, the second run is to see if there are further changes that need updated values.
If you are applying filters to the arrays, it’s often best to do this in your javascript as opposed to piping it in the HTML
[php]// don’t do this {{ filter_expression | filter : expression : comparator }}
Example of filter: $filter(‘filter’)(array, expression, comparator);[/php]
One time binding does not seem to play well with filters. There seems to be work arounds to make it work, but I think it’s cleaner and more intuitive to simply assign the needed value to a variable (or set it as a property on an object, if you are dealing with a lot of variables). As we have done in one of our project.
Previous:
[php]<div class=”table-wrap”> <table class=”table” ng-show=”uploader.queue.length>0″> <thead> <tr> <th width=”50%”>{{‘wall_file_lbl_name’ | translate}}</th> <th ng-show=”uploader.isHTML5″>{{‘wall_file_lbl_size’ | translate}}</th> <th ng-show=”uploader.isHTML5″>{{‘wall_file_lbl_progress’ | translate}}</th> <th>{{‘wall_file_lbl_status’ | translate}}</th> <th>{{‘wall_file_lbl_actions’ | translate}}</th> </tr> </thead>[/php]
Now:
[php]<div class=”table-wrap”> <table class=”table” ng-show=”uploader.queue.length>0″> <thead> <tr> <th width=”50%”>{{::translateKeyObj.wall_file_lbl_name}}</th> <th ng-show=”uploader.isHTML5″>{{::translateKeyObj.wall_file_lbl_size}}</th> <th ng-show=”uploader.isHTML5″>{{::translateKeyObj.wall_file_lbl_progress}}</th> <th>{{::translateKeyObj.wall_file_lbl_status}}</th> <th>{{::translateKeyObj.wall_file_lbl_actions}}</th> </tr> </thead>[/php]
You can do: – In JavaScript $scope.translateKeyObj.btn_edit : gettextCatalog.getString(“btn_edit”) – In HTML {{::translateKeyObj.wall_file_lbl_status}}
[php]$scope.translateKeyObj = { }; $scope.getText = function() { $scope.translateKeyObj.wall_lbl_filter_by = gettextCatalog.getString(“wall_lbl_filter_by”); $scope.translateKeyObj.btn_delete = gettextCatalog.getString(“btn_delete”); $scope.translateKeyObj.btn_edit = gettextCatalog.getString(“btn_edit”); $scope.translateKeyObj.btn_report_abuse = gettextCatalog.getString(“btn_report_abuse”); $scope.translateKeyObj.lbl_view_more = gettextCatalog.getString(“lbl_view_more”); $scope.translateKeyObj.btn_like = gettextCatalog.getString(“btn_like”); $scope.translateKeyObj.btn_comment = gettextCatalog.getString(“btn_comment”); $scope.translateKeyObj.btn_share = gettextCatalog.getString(“btn_share”);[/php]
Filters are something to also be avoided as much as possible when using within a loop.
Use ng-if instead of ng-show (but confirm that ng-if is actually better for your use case)
The two directives achieve the same result but in different ways:
* ng-show will render an element, and use display:none to hide it, * ng-if will actually removes the element from DOM, and will re-create it, if it’s needed.
You may need ng-show for an elements that toggles on an off often, but for 95% of the time, ng-if is a better way to go.
Use $watchCollection instead of $watch (with a 3rd parameter)
$watch with only 2 parameters, is fast. However, Angular supports a 3rd parameter to this function, that can look like this: $watch(‘value’, function(){}, true). The third parameter, tells Angular to perform deep checking, meaning to check every property of the object, which could be very expensive.
To address this performance issue, Angular added $watchCollection(‘value’, function(){}). $watchCollection acts almost like $watch with a 3rd parameter, except it only checks the first layer of object’s properties, thus greatly improving the performance.
I hope you found the above blog informative and we would be glad if it could contribute in optimizing the performance of your Angular JS App.
To read more of such posts around web and mobile technology, subscribe to our blog and we will keep you posted.
Topics: Web Development
We equip smart companies with smarter solutions. Our all-round expertise in Web, Mobile and Cloud solutions has brought about a change in some of the top businesses, setting global milestones as we go.
Previous Post
From an Idea to an App – How not to fail
Next Post
How UI/UX Influence The Success Of Your App