What is the maximum size of data that can be stored in the corner area? Application performance with heavy areas?

Earlier, I made some small small examples with Angular JS. I have doubts about Angular $ in terms of being able to store large datasets and performance with large datasets .

Example: in hotel reservation systems (e.g. http://www.hotels.com ), as a rule, the Hotel API (Hotelbeds, DOTW ...) provides hundreds of hotels for Bangkok, Dubai, Spain ... etc. Like popular destinations.

My question is:

  • Can an application run without performance loss when we assign this a lot of Angular Scope data?

  • What is the maximum size of data that can be stored in Angular Scope?

+6
source share
2 answers

In my experience, when you work with a large number of DOM nodes, each of which contains several DOM nodes, your applications will be affected sooner or later: it just happens with all applications on the javascript client side, as it depends on your computer. and ram.

To avoid the problem, it is best to work with a small amount of data in your view and, of course, there are several methods, such as infinite scrolling, that help you achieve your goal. In general, you should show multiple dom nodes in your view each time a user does an action (such as scrolling, changing a page, or filtering).

See this interesting article: AngularJS Virtual Scrolling

If you want to check application execution in angular mode, use Batarang

+7
source

I recommend that you remain under 2,000 observers for performance reasons.

There are several ways to calculate how much you have, but the easiest thing for a beginner is to use the Angular Watchers Chrome extension.

0
source

Source: https://habr.com/ru/post/949525/


All Articles