So I'm trying to design a web app that requires a good amount of data (10,000 rows). This amount, however, will grow exponentially over time. Maybe into hundreds of thousands of rows. I want to describe two methodologies of how to pull in and present the data and get recommendations on which method would be faster overall. Also, the people using the webapplication are local to the servers (very low, if any latency)
The first method:
Second Method:
My hangup on this - The first method requires only 1 API call, but counts all the data in JavaScript and all at once, meaning even if you don't need some of the data, it is all loaded.
The second method requires multiple API calls, but counts all the data on the SQL Server and only returns the data that you need on demand. Will making a lot of separate API calls instead of 1 large API call slow things down?
Imho you shold go with the second option. i would not see a problem wrt to performance. Counting based on category will be fast and the next calls will be smaller as amount returned and processed by the server.