Everytime I pass data I use IEnumerable from the controller to the view. But Today I was thinking about what would happen if there are a thousand or millions rows in the table,... Will it overload the processor? or Will it use all the ram?.
So now I am thinking if use a jquery DataTable using its serverside option to bring rows by pagination and not all at once.
Is this a good idea or there is no problem if I keep using IEnumerable
Rendering millions of rows in one HTML view is too much. Even thousands will be quite slow. There are a few parts involved:
Typically the rendering part is the first that becomes slow. Trying to render 10.000s of rows may freeze the users browser while the server components typically still work fine (assuming you don't have too many users at once).
Sending the data over the network is no problem, as long as we're talking about typical desktop users only. It is a problem, if you're targeting mobile devices.
Creating an html view on the server is often quite fast. If you have many users the database will be the problem (because it's more difficult to scale than the c# part).
So in short: Yes. If you want to support large data sets, you must ensure that
You can apply one or both of these strategies.