ng-repeat causing performance issues with extensive dataset

My application is having performance issues when trying to list around 100k objects using ng-repeat along with filters. The UI freezes whenever I make a selection in the filters. How can I address this issue?

<h3>Filters</h3>
<input type="number" placeholder="start id" ng-model="start_id">
<input type="number" placeholder="number of items" ng-model="quantity">
<input type="text" placeholder="enter name" ng-model="name">
<ul ng-repeat="data in json | custom:start_id:quantity:name">
   <li>{{::data.id}} {{::data.name}} -------------- {{::data.timeStamp}}</li>
</ul>
myApp.filter('custom', function() {
    return function(input, start_id, quantity, name) {
      if (!input) return input;
      var len = 0;
      var result = {};
      angular.forEach(input, function(value, key) {
        if ((start_id === undefined || key >= start_id) && (quantity == undefined || len < quantity)) {
            if (name !== undefined) {
                var actual = value.name.toLowerCase();
                var expected = name.toLowerCase();
                if (actual.indexOf(expected) !== -1) {
                    result[key] = value;
                    len++;
                }
            } else {
                result[key] = value;
                len++;
            }
        }
      });
      return result;
    }
});

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How do I redirect with a GET method after calling the *delete* method in Node / Express server?

As someone new to AJAX and Node, I encountered a dilemma that I hope to get some guidance on. Here's the issue: I have a DELETE ajax call that removes a row from the database and I want to redirect back to the same route with a GET method afterwards. ...

What could be causing this minimal Angular - WebTorrent configuration to fail?

The setup appears to be quite straightforward. Check out the Webtorrent usage reference here This is how I have my setup: import WebTorrent from 'webtorrent'; @Component({ selector: 'app-root', standalone: true, template: `bla` ...

Using Three.JS to navigate a 3D cube by utilizing accelerometer data on both the x and y axes

After referencing my previous question I'm currently working on a 3D model that responds to input from accelerometer and gyroscope sensors. The 3D model is created using three.js, and the input data for rotation and translation is in JSON format. How ...

PhoneGap and jQuery prove ineffective in fetching json results from Twitter

I've been working on a project to fetch the most recent 50 tweets with a specific hash tag. The project is built for mobile devices using PhoneGap (0.9.6) and jQuery (1.6.1). Below is my code: function retrieveTweets(hash, numOfResults) { var uri ...

Encountering numerous errors when importing Wallet Connect / Web3 Provider

I encountered some challenges when trying to incorporate the "@walletconnect/web3-provider" JS library into my project. After installing the library along with the Web3 module using the following command: npm install --save web3 @walletconnect/web3-provide ...

When dragging a new connection in jsPlumb, the existing one should be automatically removed

After using jsPlumb, I was able to create a setup with the following features: Multiple nodes functioning like nodes in a unique flowchart design. Each node has a single target where connections can be dropped. Every node has zero, one, or more exits. Ea ...

Playing a game of rock, paper, scissors with two players using JavaScript

Hello! I am a beginner in JavaScript and I am trying to create a simple rock, paper, scissors game. However, when I run the code, I receive two prompt messages and an error saying 'TypeError: playerOneChoice is not a function'. What mistake did I ...

The pagination feature in ng-table is not working as expected. Instead of displaying paginated table content

I am currently working on implementing pagination with ng-table, but I am facing an issue where all the data is being displayed on a single page instead of paginating it. Although there are no errors and the page numbers are shown, the content is not being ...

JSON.parse encountered an unexpected character that is not whitespace following the JSON data

I'm having trouble fetching data from the database using the json object. Whenever I call the servlet, jQuery returns SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data. This error seems to occur only when the response contai ...

The steps to triggering a button click after e.preventDefault()

When attempting to prevent a click() event of a button by using preventDefault() after unbinding the button with unbind(), I encountered an issue where it did not work as expected. <script> $("#update2FAButton").on("click",function(e){ e.pre ...

Working with time durations in Moment.js to manipulate datetime

How can I properly combine the variable secondsToMinutes with the startdate? The value of secondsToMinutes is "3:20" and the startDate is "2:00 PM". The desired endDate should be "2:03:20 PM". Despite my efforts, I keep encountering errors every time I at ...

How come this state remains bound to this function even after it has been updated? - Using NextJS version 13.3.0 with React

A unique scenario arises where a button triggers the display of a modal created using a dialog HTML element. This button is stored in a state (thingsToRender) based on a condition, which is simulated within a useEffect hook. The issue lies in the fact that ...

Does adding .catch resolve a promise?

Being new to typescript / javascript, I have limited knowledge about promises. My current scenario involves creating three distinct promises within a cloud-function and subsequently returning them using Promise.all([promise1, promise2, promise3]). Each of ...

Is it possible to have Protractor utilize the IEDriverServer.exe that was updated by webdriver-update in the node_modules folder?

Currently, I am in the process of writing acceptance tests for my angular web application project. These tests are executed using protractor and everything is working smoothly on Chrome. However, when attempting to run the tests on Internet Explorer 11, an ...

Executing unique actions on AngularJS resources

Having trouble understanding how to pass custom parameters to a method. Here's what I have so far: .factory('OrdersFactory', ['$resource', 'baseUrl', function ($resource, baseUrl) { var actionUrl = baseUrl + 'or ...

The impact of THREE.OrbitControls on the rotation of objects in the scene

Recently started diving into THREE.js and I've put together a simple scene with the basics: http://codepen.io/inspiral/full/Lewgj Overall, everything is running smoothly aside from an odd glitch that's been happening due to the new mouse event h ...

The addition of special characters to strings in TypeScript through JavaScript is not functioning as expected

I need assistance on conditionally appending a string based on values from captured DOM elements. When the value is empty, I want to include the special character "¬". However, when I try adding it, I get instead because the special character is not reco ...

Exiting callback function in JavaScript

Is there a way to retrieve the return value from within a node.js/javascript callback function? function get_logs(){ User_Log.findOne({userId:req.user._id}, function(err, userlogs){ if(err) throw err; if(userlogs){ ...

The issue with MaterialUI Select's set value is that it consistently falls outside the expected

I'm currently working on a MaterialUI Select component where I am dynamically handling the value parameter. However, I'm facing an issue where even though I set a valid value from the available options, it always shows as out of range. SelectInp ...

Adding rows to a Datatable using an object array in rows.add()

Attempting to refresh my current Datatable by fetching new data using an Ajax function. Despite trying various solutions from other sources, the table does not update as expected. The function being used is shown below: $.ajax({ url: "<?php echo s ...