I am using multiple ng-repeats in the ionic view to show json data, i can get the data in console in no time but I guess having multiple ng-repeats has slowed the perform altogether, which cause the app to freeze and takes a minute or so for the data to appear on the view.
Is there an alternate way , to avoid speed up the performance. ?
You can use collection-repeat.
collection-repeat allows an app to show huge lists of items much more
performant than ng-repeat.
Related
There is the code which is already developed, I need to improve performance issue where code is build in angularjs. The page is getting loaded with grid having default 10 records with no issues. But issues occur when we select dropdown and if we select 50 or 100 records need to load that time performance issues occur to load the grid.Due to design, the controller variable is been use i.e for eg abc goes in digest cycle when search is made to get the data.With the large data, it creates delay in grid refresh.
The directive is created to load the data. There is no use of ng-repeat. Requesting for solution
In this way the grid is bind.Can any one tell me Y ~ this sign has been used
I have a requirement to consume huge volume of data ( like more than 100000 rows) by calling API end point and Data format is JSON and display them in react page. I am developing the logic using React-Table, but would like to hear experts opinion to know whether this is possible in reactjs? Is React-Table the right option in reactjs? Will there be performance issues?
Yes this is surely possible but involves the usage of virtual views like react-virtualized
The problem with 100k rows is that first render takes a lot of time, scroll could be tedious and every re-render takes a significant amount of time too.
With virtual views data is rendered only in active viewport and element are added/removed upon scroll reducing the rendering/reconciliation payload.
I have an AngularJS app with a ng-repeat. This ng-repeat displays only about 60 watchers (the list of ng-repeat contains quite big JSON objects though). In the same page I have an input. When I try to write inside this input, it is very slow (displays one letter every second).
I tried to optimize as much as possible but the inputs in my whole app are slow. If I disable the ng-repeat, the inputs goes back to normal speed.
Can someone explain to me why inputs are slow? And if I can solve this problem?
I have a json file which has about 8000 contacts in it, fetching all that data takes a very long time with angularjs using ng-repeat, is there any fix for this?
You cannot expect much speed when retrieving such large records. You can optimize the ng-repeat performance by using
Track by
BindOnce
Infinite Scroll
These things will improve the performance to an extent.
I am using ng-repeat to render a complex set of data in the UI. After receiving the data, I need to filter the data based on some checkboxes, sliders etc. Right now I will have 6 custom filters, based on time, price, and some checkboxes. I am using them like following
ng:repeat="response in searchResponse|filter:filter1(response)|filter:filter2(response)|filter:filter3(response)|filter:filter4(response)|filter:filter5(response)|filter:filter6(response)|limitTo:totalDisplayed
This works fine but I think this is a very expensive way of applying filters. I have noticed a considerable lag in performance in rendering after this. Is there a better way to handle filters here ? Considering the fact that I may have more such filters in future.
Please suggest. Thanks !
Instead of chaining filters, why not something like:
ng:repeat="response in searchResponse|filter:genericFilter(response, filterConditions)|limitTo:totalDisplayed
What you're doing is like chaining filters one after another, and that may not necessarily be needed – one filter that selects out the results based on filterConditions