I have two pages, both of them displaying the same data from the same table. One page is generated using BLINQ. The other is implemented using DataSet and ADO.NET. I found that the BLINQ generated page is much slower than the DataSet implemented page. Is this because BLINQ/LINQ/.NET 3.0 is still in beta? Or is it because of the overhead BLINQ/LINQ has to endure?
Here is what I am reasoning. When I use DataSet and ADO.NET, I can write a query and have the database engine to generate the exact data PROJECTION (according to LINQ terms) I need for a particular data view. But with BLINQ generated classes, it has to go through the process of object creation, relationship mapping, and data initialization, etc. before the data is available for displaying. Web applications are different from Windows applications. Each time when we make a request for a page, either the same page or a new page, it has to go through the same process to create the object and populate data, whereas in windows application, we can store the objects in memory and reuse it for other views and when we come back to the previous view. Therefore, if we do the right/hard-core object modeling for web applications, we would end up with lots of computing time being wasted.
As it has been said in Polita's BLINQ Introduction Video, BLINQ is a good tool for prototyping, small scale website, personal fun types of applications. In terms of enterprise web applications, and/or web services, we probably can't rely on the generated code. Am I making the appropriate statement, Polita?