|The Performance Of AngularJS|
|Written by Janet Swift|
|Thursday, 11 May 2017|
Brazilian computer scientists, Miguel Ramos, Marco Tulio Valente and Ricardo Terra have conducted a survey to find out what practicing AngularJS (note: not Angular) programmers think are the main performance problems with the framework.While a survey isn't hard information like a benchmark, it does provide some interesting indicators of what the problems are and such information is scarce:
The survey has 31 questions divided in four sections:
(2) practices and perceptions w.r.t. performance in AngularJS,
(3) general causes of AngularJS performance problems,
(4) technical causes of these problems.
The survey was promoted in a number of AngularJS communities and forums and got 95 responses - so this has to be regarded as a small, but well targeted, sample. Over 70% claimed at least 2 years experience.
Although this is only about AngularJS many of the responses are appropriate to other frameworks. For example, 45% had inspected the source code with an eye to improving performance, but only 8% admit to actually making changes. The solution adopted is to either buy a third party component 30% or build their own 27%
When asked what the causes of performance problems were the results are surprising:
The main results are discussed in the paper but the following figure, taken from the paper, provides an overview:
Top of the list of problem is unnecessary two-way binding. Remember that this is about performance problems and this suggests that automatic synchronization of data in view and model makes it too easy to overuse.
Although these results are about AngularJS the researchers have a few words to say about Angular 2.0:
"The most important architectural modification in Angular 2.0 is the new change detection mechanism, which uses immutable and observable data structures to detect changes made in the model. Specifically, immutable objects reduce the number of checks when comparing for equality complex and nested data structures. Observables also contribute to performance gains by providing specific events other objects can subscribe to in order to detect changes."
or email your comment to: firstname.lastname@example.org
|Last Updated ( Tuesday, 23 May 2017 )|