Previously i have done some small small examples with Angular JS. I have a doubt on angular $scope in terms capability to store large data sets & performance with large data sets.
Example: In hotel booking systems(like http://www.hotels.com) , Usually Hotel APIs(Hotelbeds, DOTW...) gives hundreds of hotels for Bangkok, Dubai, Spain... etc like popular destinations.
My Question is,
Can Application work without loosing performance when we assign this much data to Angular Scope?
What is the maximum size of data that can be stored in Angular Scope?
Each AngularJS application has exactly one root scope, but may have any number of child scopes.
Applications in AngularJS are controlled by controllers. Read about controllers in the AngularJS Controllers chapter. Because of the immediate synchronization of the model and the view, the controller can be completely separated from the view, and simply concentrate on the model data.
The Scope in AngularJS is the binding part between HTML (view) and JavaScript (controller) and it is a built-in object. It contains application data and objects. It is available for both the view and the controller. It is an object with available properties and methods.
In my experience when you work with a large amount of DOM nodes, each one containing several DOM nodes, sooner or later your application performances will be affected: it just happens to all javascript client side applications bacause it depends on your computer cpu and ram.
To avoid the problem it's a best pratice to work with small amount of data in your view and, of course, there are few techniques like infinite scrolling that help reaching the purpose. In general you should show in your view few dom nodes each time a user make an action (like scrolling, page changing, or filtering).
See this interesting article: AngularJS Virtual Scrolling
If you want to check an angularjs application performaces use Batarang
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With